Skip to content

Commit

Permalink
#1558 fix?
Browse files Browse the repository at this point in the history
Detect password only change
  • Loading branch information
tablatronix committed Nov 16, 2023
1 parent 680968f commit 0e20168
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,13 @@ void WiFiManager::handleWifiSave() {
_ssid = server->arg(F("s")).c_str();
_pass = server->arg(F("p")).c_str();

if(_ssid = "" && _pass != ""){
_ssid = WiFi_SSID(true); // password change, placeholder ssid, @todo compare pass to old?, confirm ssid is clean
#ifdef WM_DEBUG_LEVEL
DEBUG_WM(WM_DEBUG_VERBOSE,F("Detected WiFi password change"));
#endif
}

#ifdef WM_DEBUG_LEVEL
String requestinfo = "SERVER_REQUEST\n----------------\n";
requestinfo += "URI: ";
Expand Down

0 comments on commit 0e20168

Please sign in to comment.