From 87bd628241b002c866c0d425cd8c95a42d04f31a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 14 Oct 2013 14:31:00 +0200 Subject: [feature/passwords] Minor cleanup in passwords files PHPBB3-11610 --- phpBB/phpbb/passwords/driver/salted_md5.php | 3 --- phpBB/phpbb/passwords/helper.php | 1 - phpBB/phpbb/passwords/manager.php | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) (limited to 'phpBB/phpbb/passwords') diff --git a/phpBB/phpbb/passwords/driver/salted_md5.php b/phpBB/phpbb/passwords/driver/salted_md5.php index bccf61dc07..96dd298789 100644 --- a/phpBB/phpbb/passwords/driver/salted_md5.php +++ b/phpBB/phpbb/passwords/driver/salted_md5.php @@ -105,7 +105,6 @@ class salted_md5 extends \phpbb\passwords\driver\base { return (md5($password) === $hash) ? true : false; } - // No need to check prefix, already did that in manage if ($hash === $this->hash($password, $hash)) { @@ -121,8 +120,6 @@ class salted_md5 extends \phpbb\passwords\driver\base */ protected function generate_salt() { - $salt = ''; - $random = ''; $count = 6; $random = $this->helper->get_random_salt($count); diff --git a/phpBB/phpbb/passwords/helper.php b/phpBB/phpbb/passwords/helper.php index 28a13d2224..0a0bf1d6b1 100644 --- a/phpBB/phpbb/passwords/helper.php +++ b/phpBB/phpbb/passwords/helper.php @@ -119,7 +119,6 @@ class helper */ public function check_combined_hash($password, $stored_hash_type, $hash) { - $cur_hash = ''; $i = 0; $data = array( 'prefix' => '$', diff --git a/phpBB/phpbb/passwords/manager.php b/phpBB/phpbb/passwords/manager.php index 0b41d3a8c3..dde81a9818 100644 --- a/phpBB/phpbb/passwords/manager.php +++ b/phpBB/phpbb/passwords/manager.php @@ -164,11 +164,10 @@ class manager return false; } - $return_ary[$type] = $this->get_algorithm("\${$type}\$"); + $return_ary[$type] = $this->get_algorithm('$' . $type . '$'); if (empty($return_ary[$type])) { - return false; } } -- cgit v1.2.1