aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-05-07 15:11:42 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-05-07 15:11:42 +0200
commitc4109d9aefdde9e0d88dfaf96c9cec97cd3694a1 (patch)
treea561a110379a4221bdfdb3a298826f73eac9b06f
parent254fa5eb22efa5ba572702064377a6ad9eec9a53 (diff)
downloadnextcloud-server-c4109d9aefdde9e0d88dfaf96c9cec97cd3694a1.tar.gz
nextcloud-server-c4109d9aefdde9e0d88dfaf96c9cec97cd3694a1.zip
Use strict type comparison
We certainly don't want to have type juggling on that.
-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'];