aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/user/database.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index 681f03981f5..dec38464f98 100644
--- a/lib/private/user/database.php
+++ b/lib/private/user/database.php
@@ -183,14 +183,14 @@ class OC_User_Database extends OC_User_Backend {
$row = $result->fetchRow();
if ($row) {
$storedHash = $row['password'];
- if ($storedHash[0] == '$') { //the new phpass based hashing
+ if ($storedHash[0] === '$') { //the new phpass based hashing
$hasher = $this->getHasher();
if ($hasher->CheckPassword($password . OC_Config::getValue('passwordsalt', ''), $storedHash)) {
return $row['uid'];
}
//old sha1 based hashing
- } elseif (sha1($password) == $storedHash) {
+ } elseif (sha1($password) === $storedHash) {
//upgrade to new hashing
$this->setPassword($row['uid'], $password);
return $row['uid'];