diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2013-01-29 22:13:35 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2013-01-29 22:13:35 +1100 |
| commit | 774e27caf5a8e4177b58006f54e31d9e94b14989 (patch) | |
| tree | 3fb0ad58ecbc39dddfa5c29fee2bb2707b22aebb /inc/mod | |
| parent | e5bf2a91fc87c4a72885e40114b113daf740b17b (diff) | |
Use === operator in authentication.
Diffstat (limited to 'inc/mod')
| -rw-r--r-- | inc/mod/auth.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/mod/auth.php b/inc/mod/auth.php index f594af4b..8fb01ecb 100644 --- a/inc/mod/auth.php +++ b/inc/mod/auth.php @@ -49,7 +49,7 @@ function login($username, $password, $makehash=true) { 'username' => $username, 'hash' => mkhash($username, $password), 'boards' => explode(',', $user['boards']) - ); + ); } else return false; } @@ -108,7 +108,7 @@ if (isset($_COOKIE[$config['cookies']['mod']])) { $user = $query->fetch(); // validate password hash - if ($cookie[1] != mkhash($cookie[0], $user['password'], $cookie[2])) { + if ($cookie[1] !== mkhash($cookie[0], $user['password'], $cookie[2])) { // Malformed cookies destroyCookies(); error($config['error']['malformed']); |
