File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 3333
3434
3535static  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\" "  ;
3738static  const  char  WWW_Authenticate[] = " WWW-Authenticate"  ;
3839static  const  char  Content_Length[] = " Content-Length"  ;
3940
@@ -185,7 +186,7 @@ bool WebServer::authenticate(const char * username, const char * password){
185186      }
186187      //  parameters for the RFC 2617 newer Digest
187188      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 ) {
189190        _nc = _extractParam (authReq, F (" nc="  ), ' ,'  );
190191        _cnonce = _extractParam (authReq, F (" cnonce=\" "  ),' \" '  );
191192      }
@@ -205,7 +206,7 @@ bool WebServer::authenticate(const char * username, const char * password){
205206      }
206207      log_v (" Hash of GET:uri=%s"  , _H2.c_str ());
207208      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 ) {
209210          _responsecheck = md5str (_H1 + ' :'   + _nonce + ' :'   + _nc + ' :'   + _cnonce + F (" :auth:"  ) + _H2);
210211      } else  {
211212          _responsecheck = md5str (_H1 + ' :'   + _nonce + ' :'   + _H2);
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments