From: Nico Kaiser Date: Fri, 28 Mar 2014 23:14:03 +0000 (+0100) Subject: Fix password check; fixes #7 X-Git-Tag: v1.0.1~1 X-Git-Url: http://git.neszt.hu/?a=commitdiff_plain;h=24c6e394bbf14c07eeba8a46651acfac1cf0fce1;p=Dyndns%2F.git Fix password check; fixes #7 --- diff --git a/src/Dyndns/Users.php b/src/Dyndns/Users.php index 81f8172..3f1627e 100644 --- a/src/Dyndns/Users.php +++ b/src/Dyndns/Users.php @@ -22,8 +22,7 @@ class Users foreach ($lines as $line) { if (preg_match("/^(.*?):(.*)/", $line, $matches)) { if (strtolower($matches[1]) == strtolower($user)) { - $salt = substr($matches[2], 0, 2); - if (crypt($password, $salt) === $matches[2]) { + if (crypt($password, $matches[2]) === $matches[2]) { $this->debug('Login successful for user ' . $user); return true; } else {