forked from leftypol/leftypol
Use === operator in authentication.
This commit is contained in:
parent
e5bf2a91fc
commit
774e27caf5
1 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ if (isset($_COOKIE[$config['cookies']['mod']])) {
|
||||||
$user = $query->fetch();
|
$user = $query->fetch();
|
||||||
|
|
||||||
// validate password hash
|
// 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
|
// Malformed cookies
|
||||||
destroyCookies();
|
destroyCookies();
|
||||||
error($config['error']['malformed']);
|
error($config['error']['malformed']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue