mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-01 05:59:24 +00:00
Fixed long web passwords
This commit is contained in:
@@ -134,7 +134,11 @@ bool AmsWebServer::checkSecurity(byte level) {
|
|||||||
String providedPwd = server.header("Authorization");
|
String providedPwd = server.header("Authorization");
|
||||||
providedPwd.replace("Basic ", "");
|
providedPwd.replace("Basic ", "");
|
||||||
|
|
||||||
String expectedBase64 = base64::encode(expectedAuth);
|
String expectedBase64 = base64::encode(expectedAuth, false);
|
||||||
|
|
||||||
|
debugger->printf("Expected auth: %s\n", expectedBase64.c_str());
|
||||||
|
debugger->printf("Provided auth: %s\n", providedPwd.c_str());
|
||||||
|
|
||||||
access = providedPwd.equals(expectedBase64);
|
access = providedPwd.equals(expectedBase64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user