From 086c7e5f129927b768b5280ffdaf56aaebe51cd9 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 7 Apr 2011 23:48:07 +1200 Subject: [PATCH] Debugging, but commented out in case it's needed in the future. --- inc/HTTPAuthSession.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/inc/HTTPAuthSession.php b/inc/HTTPAuthSession.php index 97f697a7..e9bc2a53 100644 --- a/inc/HTTPAuthSession.php +++ b/inc/HTTPAuthSession.php @@ -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; } }