From b6c0f5a66d9cd53ff9b2912eda6318e5c8fc3fad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 29 Sep 2020 12:18:39 +0200 Subject: [PATCH] Rename IPasswordAlgorithm::needs_rehash() to needsRehash() --- wcfsetup/install/files/lib/data/user/User.class.php | 2 +- .../user/authentication/password/IPasswordAlgorithm.class.php | 2 +- .../user/authentication/password/algorithm/Bcrypt.class.php | 2 +- .../authentication/password/algorithm/DoubleBcrypt.class.php | 2 +- .../system/user/authentication/password/algorithm/Invalid.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index dd5c8767e8..3c07f452fe 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -166,7 +166,7 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl $defaultAlgorithm = $manager->getDefaultAlgorithm(); if (\get_class($algorithm) !== \get_class($defaultAlgorithm) || - $algorithm->needs_rehash($hash) + $algorithm->needsRehash($hash) ) { $userEditor = new UserEditor($this); $userEditor->update([ diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/IPasswordAlgorithm.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/IPasswordAlgorithm.class.php index 87fb3ae943..36cbd18ee0 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/IPasswordAlgorithm.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/IPasswordAlgorithm.class.php @@ -26,5 +26,5 @@ interface IPasswordAlgorithm { /** * Returns whether the given $hash still matches the configured security parameters. */ - public function needs_rehash(string $hash): bool; + public function needsRehash(string $hash): bool; } diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Bcrypt.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Bcrypt.class.php index 3aa2ee18d4..62a9e73288 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Bcrypt.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Bcrypt.class.php @@ -33,7 +33,7 @@ final class Bcrypt implements IPasswordAlgorithm { /** * @inheritDoc */ - public function needs_rehash(string $hash): bool { + public function needsRehash(string $hash): bool { return \password_needs_rehash($hash, \PASSWORD_BCRYPT, self::OPTIONS); } } diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/DoubleBcrypt.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/DoubleBcrypt.class.php index 67f6cfca51..1add9f65cc 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/DoubleBcrypt.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/DoubleBcrypt.class.php @@ -44,7 +44,7 @@ final class DoubleBcrypt implements IPasswordAlgorithm { /** * @inheritDoc */ - public function needs_rehash(string $hash): bool { + public function needsRehash(string $hash): bool { return self::isDifferentBlowfish($hash); } diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Invalid.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Invalid.php index 93c4318d4f..232261bf26 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Invalid.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Invalid.php @@ -29,7 +29,7 @@ final class Invalid implements IPasswordAlgorithm { /** * @inheritDoc */ - public function needs_rehash(string $hash): bool { + public function needsRehash(string $hash): bool { return false; } } -- 2.20.1