Debugging, but commented out in case it's needed in the future.

This commit is contained in:
Andrew McMillan 2011-04-07 23:48:07 +12:00
parent 13fa85d8ab
commit 086c7e5f12

View File

@ -197,15 +197,18 @@ class HTTPAuthSession {
if ( $matches[1] == 'Digest' )
$A1 = $matches[2];
else {
dbg_error_log( "HTTPAuth", "Constructing A1 from md5(%s:%s:%s)", $data['username'], $realm, $matches[2] );
// dbg_error_log( "HTTPAuth", "Constructing A1 from md5(%s:%s:%s)", $data['username'], $realm, $matches[2] );
$A1 = md5($data['username'] . ':' . $realm . ':' . $matches[2]);
}
$A2 = md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']);
$valid_response = md5($A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2);
$auth_string = $A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2;
// dbg_error_log( "HTTPAuth", "DigestAuthString: %s", $auth_string);
$valid_response = md5($auth_string);
// dbg_error_log( "HTTPAuth", "DigestResponse: %s", $valid_response);
if ( $data['response'] == $valid_response ) {
$this->AssignSessionDetails($test_user);
dbg_error_log( "HTTPAuth", "Success!!!" );
// dbg_error_log( "HTTPAuth", "Success!!!" );
return;
}
}