Make sure wifi password will not be saved in db if wifi is not configured by deconz
@@ -2905,14 +2905,28 @@ int DeRestPluginPrivate::putWifiUpdated(const ApiRequest &req, ApiResponse &rsp)
}
if (!workingpw.isEmpty() && gwWifiWorkingPw != workingpw)
+ {
+ if (gwWifi == "not-configured")
+ {
+ gwWifiWorkingPw = QString();
+ }
+ else
{
gwWifiWorkingPw = workingpw;
+ }
changed = true;
}
if (!wifipw.isEmpty() && gwWifiPw != wifipw)
+ {
+ if (gwWifi == "not-configured")
+ {
+ gwWifiPw = QString();
+ }
+ else
{
gwWifiPw = wifipw;
+ }
changed = true;
}
@@ -2942,8 +2956,15 @@ int DeRestPluginPrivate::putWifiUpdated(const ApiRequest &req, ApiResponse &rsp)
changed = true;
}
if (!workingpw.isEmpty() && gwWifiBackupPw != workingpw)
+ {
+ if (gwWifi == "not-configured")
+ {
+ gwWifiBackupPw = QString();
+ }
+ else
{
gwWifiBackupPw = workingpw;
+ }
changed = true;
}
}
