diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 8c3c59bc5..4a442421e 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -2879,10 +2879,9 @@ class Bootstrap $encrypt = $typeEncrypt['previous']; } } + eval("\$var = hash('" . $encrypt . "', '" . $pass . "');"); if ($includeHashType) { - $var = $encrypt . ':' . $pass; - } else { - eval("\$var = hash('" . $encrypt . "', '" . $pass . "');"); + $var = $encrypt . ':' . $var; } return $var; @@ -2892,11 +2891,11 @@ class Bootstrap { $hashType = Bootstrap::getPasswordHashType(); if (Bootstrap::hashPassword($pass, $hashType) == $userPass - || Bootstrap::hashPassword($pass, $hashType, true) == $userPass) { + || $pass === Bootstrap::hashPassword($userPass, $hashType, true)) { return true; } if (Bootstrap::hashPassword($pass, $hashType, false, true) == $userPass - || Bootstrap::hashPassword($pass, $hashType, true, true) == $userPass) { + ||$pass === Bootstrap::hashPassword($userPass, $hashType, true, true)) { return true; } return false;