diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-06-04 16:52:08 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-06-04 16:52:08 +0200 |
commit | 852337cacd856429d4b4f6a4032fc833a8486590 (patch) | |
tree | a65260b4093bc6dbd7604dec6ca8df2bea433fb8 /phpBB/phpbb/passwords | |
parent | db3782e4912e2945a546309dab38a4c00bd0f5c5 (diff) | |
download | forums-852337cacd856429d4b4f6a4032fc833a8486590.tar forums-852337cacd856429d4b4f6a4032fc833a8486590.tar.gz forums-852337cacd856429d4b4f6a4032fc833a8486590.tar.bz2 forums-852337cacd856429d4b4f6a4032fc833a8486590.tar.xz forums-852337cacd856429d4b4f6a4032fc833a8486590.zip |
[ticket/13917] Use hash_equals() if it's available
PHPBB3-13917
Diffstat (limited to 'phpBB/phpbb/passwords')
-rw-r--r-- | phpBB/phpbb/passwords/driver/helper.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/phpbb/passwords/driver/helper.php b/phpBB/phpbb/passwords/driver/helper.php index caa65080ac..a99541233f 100644 --- a/phpBB/phpbb/passwords/driver/helper.php +++ b/phpBB/phpbb/passwords/driver/helper.php @@ -153,6 +153,12 @@ class helper */ public function string_compare($string_a, $string_b) { + // Use hash_equals() if it's available + if (function_exists('hash_equals')) + { + return hash_equals($string_a, $string_b); + } + $difference = strlen($string_a) != strlen($string_b); for ($i = 0; $i < strlen($string_a) && $i < strlen($string_b); $i++) |