mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-20 18:52:04 +02:00
send 401 header too if auth string is empty #116
This commit is contained in:
@ -766,17 +766,13 @@ void WebSocketsServer::handleHeader(WSclient_t * client, String * headerLine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(_base64Authorization.length() > 0) {
|
if(_base64Authorization.length() > 0) {
|
||||||
if(client->base64Authorization.length() > 0) {
|
String auth = WEBSOCKETS_STRING("Basic ");
|
||||||
String auth = WEBSOCKETS_STRING("Basic ");
|
auth += _base64Authorization;
|
||||||
auth += _base64Authorization;
|
if(auth != client->base64Authorization) {
|
||||||
if(auth != client->base64Authorization) {
|
DEBUG_WEBSOCKETS("[WS-Server][%d][handleHeader] HTTP Authorization failed!\n", client->num);
|
||||||
DEBUG_WEBSOCKETS("[WS-Server][%d][handleHeader] HTTP Authorization failed!\n", client->num);
|
handleAuthorizationFailed(client);
|
||||||
handleAuthorizationFailed(client);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ok = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ok) {
|
if(ok) {
|
||||||
|
Reference in New Issue
Block a user