File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ void setup(void) {
7777 html += " <h2>Reset Configuration?</h2>" ;
7878 html += " <p>Are you sure you want to reset the WiFi configuration? This will clear current WiFi settings and restart the device in AP mode.</p>" ;
7979 html += " <form method='POST' style='display:inline;' accept-charset='UTF-8'>" ;
80- if (reset_password != nullptr && String (reset_password). length ( ) > 0 ) {
80+ if (reset_password != nullptr && strlen (reset_password) > 0 ) {
8181 html += " <input type='password' name='reset_password' placeholder='Enter reset password' required><br/>" ;
8282 }
8383 html += " <button type='submit' class='btn btn-yes'>Yes, Reset</button>" ;
@@ -88,7 +88,7 @@ void setup(void) {
8888 });
8989
9090 server.on (" /reset" , AsyncWebRequestMethod::HTTP_POST, [](AsyncWebServerRequest *request) {
91- if (reset_password != nullptr && String (reset_password). length ( ) > 0 ) {
91+ if (reset_password != nullptr && strlen (reset_password) > 0 ) {
9292 if (request->hasParam (" reset_password" , true )) {
9393 if (String (reset_password) == request->getParam (" reset_password" , true )->value ()) {
9494 shouldResetConfig = true ;
You can’t perform that action at this time.
0 commit comments