Skip to content

Commit 31aa766

Browse files
Fix magic hash attack
1 parent 59c90d7 commit 31aa766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/login.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function authHttpDigest()
5656

5757
$response = md5($password.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']));
5858

59-
if ($data['response'] != $response) {
59+
if ($data['response'] !== $response) {
6060
header('HTTP/1.1 401 Unauthorized');
6161
header('WWW-Authenticate: Digest realm="'.$realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.$opaque.'"');
6262
die('Invalid username and/or password combination.');

0 commit comments

Comments
 (0)