mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
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:
commit
3ead4d12d4
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue