Store saved wifi password hashed

Does have the consequence that if the user modifies the SSID, they
will also need to enter the password again, as PBKDF2 scheme hashes
SSID together with password.

Closes #344
This commit is contained in:
Floris Bos 2022-02-04 12:42:50 +01:00
parent c1234d2ea2
commit eb011bb049

View file

@ -802,7 +802,7 @@ Popup {
if (chkWifiSSIDHidden.checked) { if (chkWifiSSIDHidden.checked) {
settings.wifiSSIDHidden = true settings.wifiSSIDHidden = true
} }
settings.wifiPassword = fieldWifiPassword.text settings.wifiPassword = fieldWifiPassword.text.length == 64 ? fieldWifiPassword.text : imageWriter.pbkdf2(fieldWifiPassword.text, fieldWifiSSID.text)
settings.wifiCountry = fieldWifiCountry.editText settings.wifiCountry = fieldWifiCountry.editText
} }
if (chkLocale.checked) { if (chkLocale.checked) {