mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-07-30 10:47:31 +02:00
Update for ESP32 RTOS SDK 3.0.0
This commit is contained in:
@ -28,7 +28,7 @@ bool checkBasicAuthentication(const char * hash, const char * username, const ch
|
||||
if(username == NULL || password == NULL || hash == NULL)
|
||||
return false;
|
||||
|
||||
size_t toencodeLen = os_strlen(username)+os_strlen(password)+1;
|
||||
size_t toencodeLen = strlen(username)+strlen(password)+1;
|
||||
size_t encodedLen = base64_encode_expected_len(toencodeLen);
|
||||
if(strlen(hash) != encodedLen)
|
||||
return false;
|
||||
@ -71,7 +71,11 @@ static bool getMD5(uint8_t * data, uint16_t len, char * output){//33 bytes or mo
|
||||
}
|
||||
|
||||
static String genRandomMD5(){
|
||||
#ifdef ESP8266
|
||||
uint32_t r = RANDOM_REG32;
|
||||
#else
|
||||
uint32_t r = rand();
|
||||
#endif
|
||||
char * out = (char*)malloc(33);
|
||||
if(out == NULL || !getMD5((uint8_t*)(&r), 4, out))
|
||||
return "";
|
||||
|
Reference in New Issue
Block a user