Skip to content

Commit 570d457

Browse files
B0mb3tt4chriskacerguis
authored andcommitted
MD5 Response fix
1 parent f3ba7d7 commit 570d457

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

application/libraries/REST_Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ protected function _prepare_digest_auth()
21082108
}
21092109

21102110
$md5 = md5(strtoupper($this->request->method).':'.$digest['uri']);
2111-
$valid_response = md5($username.':'.$digest['nonce'].':'.$digest['nc'].':'.$digest['cnonce'].':'.$digest['qop'].':'.$md5);
2111+
$valid_response = md5($digest['username'].':'.$digest['nonce'].':'.$digest['nc'].':'.$digest['cnonce'].':'.$digest['qop'].':'.$md5);
21122112

21132113
// Check if the string don't compare (case-insensitive)
21142114
if (strcasecmp($digest['response'], $valid_response) !== 0)

0 commit comments

Comments
 (0)