File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 33
33
34
34
35
35
static const char AUTHORIZATION_HEADER[] = " Authorization" ;
36
- static const char qop_auth[] = " qop=\" auth\" " ;
36
+ static const char qop_auth[] PROGMEM = " qop=auth" ;
37
+ static const char qop_auth_quoted[] PROGMEM = " qop=\" auth\" " ;
37
38
static const char WWW_Authenticate[] = " WWW-Authenticate" ;
38
39
static const char Content_Length[] = " Content-Length" ;
39
40
@@ -185,7 +186,7 @@ bool WebServer::authenticate(const char * username, const char * password){
185
186
}
186
187
// parameters for the RFC 2617 newer Digest
187
188
String _nc,_cnonce;
188
- if (authReq.indexOf (FPSTR (qop_auth)) != -1 ) {
189
+ if (authReq.indexOf (FPSTR (qop_auth)) != -1 || authReq. indexOf ( FPSTR (qop_auth_quoted)) != - 1 ) {
189
190
_nc = _extractParam (authReq, F (" nc=" ), ' ,' );
190
191
_cnonce = _extractParam (authReq, F (" cnonce=\" " ),' \" ' );
191
192
}
@@ -205,7 +206,7 @@ bool WebServer::authenticate(const char * username, const char * password){
205
206
}
206
207
log_v (" Hash of GET:uri=%s" , _H2.c_str ());
207
208
String _responsecheck = " " ;
208
- if (authReq.indexOf (FPSTR (qop_auth)) != -1 ) {
209
+ if (authReq.indexOf (FPSTR (qop_auth)) != -1 || authReq. indexOf ( FPSTR (qop_auth_quoted)) != - 1 ) {
209
210
_responsecheck = md5str (_H1 + ' :' + _nonce + ' :' + _nc + ' :' + _cnonce + F (" :auth:" ) + _H2);
210
211
} else {
211
212
_responsecheck = md5str (_H1 + ' :' + _nonce + ' :' + _H2);
You can’t perform that action at this time.
0 commit comments