From 24c6e394bbf14c07eeba8a46651acfac1cf0fce1 Mon Sep 17 00:00:00 2001 From: Nico Kaiser Date: Sat, 29 Mar 2014 00:14:03 +0100 Subject: [PATCH] Fix password check; fixes #7 --- src/Dyndns/Users.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 { -- 2.1.4