Rename IPasswordAlgorithm::needs_rehash() to needsRehash()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 29 Sep 2020 10:18:39 +0000 (12:18 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 30 Sep 2020 13:56:23 +0000 (15:56 +0200)
wcfsetup/install/files/lib/data/user/User.class.php
wcfsetup/install/files/lib/system/user/authentication/password/IPasswordAlgorithm.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Bcrypt.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/DoubleBcrypt.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Invalid.php

index dd5c8767e88ff72544f954863d9fec6a444a2ff1..3c07f452fea917620843d321f3f633665454952b 100644 (file)
@@ -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([
index 87fb3ae943867845d89b2152ba50af53541654a5..36cbd18ee03ff503f62bebf94fba29150bebce57 100644 (file)
@@ -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;
 }
index 3aa2ee18d4c09bd8d5c5dc7b2a730643b63744be..62a9e732888f5cc478d6e2d6f2753dbe3cbb6e00 100644 (file)
@@ -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);
        }
 }
index 67f6cfca512c1e7b9f867a7322620a76279ff8f3..1add9f65ccfaf1f098e667ab714ecb03d9b99aba 100644 (file)
@@ -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);
        }
        
index 93c4318d4f770cd5398c1955dfc111398b235825..232261bf26ae4e4ba0605ec5d70b69241377a896 100644 (file)
@@ -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;
        }
 }