[Pkg-owncloud-commits] [owncloud] 45/69: Use strict type comparison
David Prévot
taffit at moszumanska.debian.org
Sat May 10 16:20:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit c4109d9aefdde9e0d88dfaf96c9cec97cd3694a1
Author: Lukas Reschke <lukas at statuscode.ch>
Date: Wed May 7 15:11:42 2014 +0200
Use strict type comparison
We certainly don't want to have type juggling on that.
---
lib/private/user/database.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index 681f039..dec3846 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'];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list