mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-30 12:48:21 +02:00
[ticket/12352] Add get_settings_only method to passwords driver base
PHPBB3-12352
This commit is contained in:
parent
f3eba6275a
commit
4b3aacfd18
@ -51,4 +51,12 @@ abstract class base implements driver_interface
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -80,12 +80,4 @@ class bcrypt_wcf2 extends base
|
||||
return $hash === $this->bcrypt->hash($this->bcrypt->hash($password, $salt), $salt);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -39,12 +39,4 @@ class convert_password extends base
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -56,12 +56,4 @@ class md5_mybb extends base
|
||||
return $hash === md5(md5($user_row['user_passwd_salt']) . md5($password));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -114,12 +114,4 @@ class md5_phpbb2 extends base
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -56,12 +56,4 @@ class md5_vb extends base
|
||||
return $hash === md5(md5($password) . $user_row['user_passwd_salt']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -48,12 +48,4 @@ class sha1 extends base
|
||||
{
|
||||
return $hash === sha1($password);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -47,12 +47,4 @@ class sha1_smf extends base
|
||||
{
|
||||
return $hash === $this->hash($password, $user_row);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -56,12 +56,4 @@ class sha1_wcf1 extends base
|
||||
return $hash === sha1($user_row['user_passwd_salt'] . sha1($user_row['user_passwd_salt'] . sha1($password)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -64,12 +64,4 @@ class sha_xf1 extends base
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -156,25 +156,19 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
|
||||
$this->assertSame($expected, $this->passwords_drivers['passwords.driver.md5_phpbb2']->check($password, $hash));
|
||||
}
|
||||
|
||||
public function test_md5_phpbb2_unneeded_functions()
|
||||
public function test_md5_phpbb2_hash()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_phpbb2']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_phpbb2']->get_settings_only('ae2fc75e20ee25d4520766788fbc96ae'));
|
||||
}
|
||||
|
||||
public function test_convert_password_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.convert_password']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.convert_password']->get_settings_only('ae2fc75e20ee25d4520766788fbc96ae'));
|
||||
}
|
||||
|
||||
public function test_sha1_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.sha1']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.sha1']->get_settings_only('ae2fc75e20ee25d4520766788fbc96ae'));
|
||||
}
|
||||
|
||||
public function data_md5_mybb_check()
|
||||
@ -197,8 +191,6 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
|
||||
public function test_md5_mybb_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_mybb']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_mybb']->get_settings_only('6022de2cc0ecf59ff14b57c6205ee170'));
|
||||
}
|
||||
|
||||
public function data_md5_vb_check()
|
||||
@ -223,8 +215,6 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
|
||||
public function test_md5_vb_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_vb']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.md5_vb']->get_settings_only('6022de2cc0ecf59ff14b57c6205ee170'));
|
||||
}
|
||||
|
||||
public function data_sha1_wcf1_check()
|
||||
@ -247,8 +237,6 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
|
||||
public function test_sha1_wcf1_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.sha1_wcf1']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.sha1_wcf1']->get_settings_only('6022de2cc0ecf59ff14b57c6205ee170'));
|
||||
}
|
||||
|
||||
public function data_bcrypt_wcf2_check()
|
||||
@ -271,8 +259,6 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
|
||||
public function test_bcrypt_wcf2_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.bcrypt_wcf2']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.bcrypt_wcf2']->get_settings_only('6022de2cc0ecf59ff14b57c6205ee170'));
|
||||
}
|
||||
|
||||
public function data_sha_xf1_check()
|
||||
@ -296,8 +282,6 @@ class phpbb_passwords_helper_test extends \phpbb_test_case
|
||||
public function test_sha_xf1_driver()
|
||||
{
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.sha_xf1']->hash('foobar'));
|
||||
|
||||
$this->assertSame(false, $this->passwords_drivers['passwords.driver.sha_xf1']->get_settings_only('6022de2cc0ecf59ff14b57c6205ee170'));
|
||||
}
|
||||
|
||||
protected function utf8_to_cp1252($string)
|
||||
|
Loading…
x
Reference in New Issue
Block a user