From b1a294e6f81a7e852108b9acc04ccf9a9e5adfd0 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Wed, 30 Sep 2020 13:36:00 +0200 Subject: [PATCH] Add explicit namespace for used methods --- .../user/authentication/password/algorithm/Ipb2.class.php | 4 ++-- .../user/authentication/password/algorithm/Ipb3.class.php | 4 ++-- .../authentication/password/algorithm/Joomla1.class.php | 4 ++-- .../authentication/password/algorithm/Joomla2.class.php | 4 ++-- .../authentication/password/algorithm/Joomla3.class.php | 4 ++-- .../user/authentication/password/algorithm/Mybb1.class.php | 4 ++-- .../authentication/password/algorithm/Phpfox3.class.php | 2 +- .../user/authentication/password/algorithm/Smf1.class.php | 4 ++-- .../user/authentication/password/algorithm/Smf2.class.php | 4 ++-- .../user/authentication/password/algorithm/Vb3.class.php | 4 ++-- .../user/authentication/password/algorithm/Vb4.class.php | 4 ++-- .../user/authentication/password/algorithm/Vb5.class.php | 4 ++-- .../user/authentication/password/algorithm/Wbb2.class.php | 6 +++--- .../user/authentication/password/algorithm/Wcf1.class.php | 4 ++-- .../user/authentication/password/algorithm/Wcf1e.class.php | 2 +- .../user/authentication/password/algorithm/Xf1.class.php | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb2.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb2.class.php index 04f8a524ee..0e0c5ac9aa 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb2.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb2.class.php @@ -16,7 +16,7 @@ final class Ipb2 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Ipb2 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5(md5($password) . $salt); + return \md5(\md5($password) . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb3.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb3.class.php index 21c979a2af..ddd8fb3ec5 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb3.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb3.class.php @@ -16,7 +16,7 @@ final class Ipb3 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Ipb3 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5(md5($salt) . md5($password)); + return \md5(\md5($salt) . \md5($password)); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla1.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla1.class.php index 0e4f32c6c5..6be64299bd 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla1.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla1.class.php @@ -16,7 +16,7 @@ final class Joomla1 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Joomla1 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5($password . $salt); + return \md5($password . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla2.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla2.class.php index a565cd20ad..1a5bf50487 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla2.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla2.class.php @@ -16,7 +16,7 @@ final class Joomla2 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Joomla2 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5($password . $salt); + return \md5($password . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla3.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla3.class.php index e32a4f9b67..4c24b74ce8 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla3.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla3.class.php @@ -16,7 +16,7 @@ final class Joomla3 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Joomla3 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5($password . $salt); + return \md5($password . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Mybb1.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Mybb1.class.php index 1af08430a6..df4a579d8c 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Mybb1.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Mybb1.class.php @@ -16,7 +16,7 @@ final class Mybb1 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Mybb1 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5(md5($salt) . md5($password)); + return \md5(\md5($salt) . \md5($password)); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Phpfox3.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Phpfox3.class.php index e04886954b..cd00be386e 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Phpfox3.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Phpfox3.class.php @@ -16,7 +16,7 @@ final class Phpfox3 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf1.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf1.class.php index a2bcc9d8fe..2603994af7 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf1.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf1.class.php @@ -16,7 +16,7 @@ final class Smf1 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Smf1 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return sha1($salt . $password); + return \sha1($salt . $password); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf2.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf2.class.php index 89bdcf2d35..c18c15c565 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf2.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf2.class.php @@ -16,7 +16,7 @@ final class Smf2 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Smf2 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return sha1($salt . $password); + return \sha1($salt . $password); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb3.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb3.class.php index 3534220a4c..24546c4fe1 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb3.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb3.class.php @@ -16,7 +16,7 @@ final class Vb3 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Vb3 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5(md5($password) . $salt); + return \md5(\md5($password) . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb4.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb4.class.php index 26f1fbb484..0aa3375082 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb4.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb4.class.php @@ -16,7 +16,7 @@ final class Vb4 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Vb4 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5(md5($password) . $salt); + return \md5(\md5($password) . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb5.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb5.class.php index 528bc85a2f..f911776c90 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb5.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb5.class.php @@ -16,7 +16,7 @@ final class Vb5 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Vb5 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return md5(md5($password) . $salt); + return \md5(\md5($password) . $salt); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wbb2.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wbb2.class.php index f5f6018796..bb5a8faf9e 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wbb2.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wbb2.class.php @@ -16,10 +16,10 @@ final class Wbb2 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - if (\hash_equals($hash, md5($password))) { + if (\hash_equals($hash, \md5($password))) { return true; } - else if (\hash_equals($hash, sha1($password))) { + else if (\hash_equals($hash, \sha1($password))) { return true; } @@ -30,7 +30,7 @@ final class Wbb2 implements IPasswordAlgorithm { * @inheritDoc */ public function hash(string $password): string { - return sha1($password); + return \sha1($password); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1.class.php index 6c82b52e92..c2ea2fb302 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1.class.php @@ -16,7 +16,7 @@ final class Wcf1 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } @@ -34,7 +34,7 @@ final class Wcf1 implements IPasswordAlgorithm { * Returns the hashed password, hashed with a given salt. */ private function hashWithSalt(string $password, string $salt): string { - return sha1($salt . sha1($salt . sha1($password))); + return \sha1($salt . \sha1($salt . \sha1($password))); } /** diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1e.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1e.class.php index 4746f007e2..b449f6cd7e 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1e.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1e.class.php @@ -50,7 +50,7 @@ final class Wcf1e implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); return \hash_equals($hash, $this->hashWithSalt($password, $salt)); } diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Xf1.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Xf1.class.php index f74c305679..d170488b9b 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Xf1.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Xf1.class.php @@ -16,7 +16,7 @@ final class Xf1 implements IPasswordAlgorithm { * @inheritDoc */ public function verify(string $password, string $hash): bool { - [$hash, $salt] = explode(':', $hash, 2); + [$hash, $salt] = \explode(':', $hash, 2); if (\hash_equals($hash, \sha1(\sha1($password) . $salt))) { return true; -- 2.20.1