Fix validation so that 8 character WiFi passwords work

This commit is contained in:
Jonny 2025-09-16 16:11:13 +01:00
parent 980e450871
commit 5277665dd1

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");