Merge pull request #1543 from jonny5532/fix/allow-8char-wifi-passwords

Fix validation so that 8 character WiFi passwords work
This commit is contained in:
Daniel Öster 2025-09-16 19:39:05 +03:00 committed by GitHub
commit 3ead4d12d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -621,7 +621,7 @@ void init_webserver() {
def_route_with_auth("/updatePassword", server, HTTP_GET, [](AsyncWebServerRequest* request) { def_route_with_auth("/updatePassword", server, HTTP_GET, [](AsyncWebServerRequest* request) {
if (request->hasParam("value")) { if (request->hasParam("value")) {
String value = request->getParam("value")->value(); String value = request->getParam("value")->value();
if (value.length() > 8) { // Check if password is within the allowable length if (value.length() >= 8) { // Password must be 8 characters or longer
password = value.c_str(); password = value.c_str();
store_settings(); store_settings();
request->send(200, "text/plain", "Updated successfully"); request->send(200, "text/plain", "Updated successfully");