mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/passwords] Minor cleanup in passwords files
PHPBB3-11610
This commit is contained in:
parent
61f60d395a
commit
87bd628241
3 changed files with 1 additions and 6 deletions
|
@ -105,7 +105,6 @@ class salted_md5 extends \phpbb\passwords\driver\base
|
||||||
{
|
{
|
||||||
return (md5($password) === $hash) ? true : false;
|
return (md5($password) === $hash) ? true : false;
|
||||||
}
|
}
|
||||||
// No need to check prefix, already did that in manage
|
|
||||||
|
|
||||||
if ($hash === $this->hash($password, $hash))
|
if ($hash === $this->hash($password, $hash))
|
||||||
{
|
{
|
||||||
|
@ -121,8 +120,6 @@ class salted_md5 extends \phpbb\passwords\driver\base
|
||||||
*/
|
*/
|
||||||
protected function generate_salt()
|
protected function generate_salt()
|
||||||
{
|
{
|
||||||
$salt = '';
|
|
||||||
$random = '';
|
|
||||||
$count = 6;
|
$count = 6;
|
||||||
|
|
||||||
$random = $this->helper->get_random_salt($count);
|
$random = $this->helper->get_random_salt($count);
|
||||||
|
|
|
@ -119,7 +119,6 @@ class helper
|
||||||
*/
|
*/
|
||||||
public function check_combined_hash($password, $stored_hash_type, $hash)
|
public function check_combined_hash($password, $stored_hash_type, $hash)
|
||||||
{
|
{
|
||||||
$cur_hash = '';
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$data = array(
|
$data = array(
|
||||||
'prefix' => '$',
|
'prefix' => '$',
|
||||||
|
|
|
@ -164,11 +164,10 @@ class manager
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$return_ary[$type] = $this->get_algorithm("\${$type}\$");
|
$return_ary[$type] = $this->get_algorithm('$' . $type . '$');
|
||||||
|
|
||||||
if (empty($return_ary[$type]))
|
if (empty($return_ary[$type]))
|
||||||
{
|
{
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue