aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/passwords
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-09-25 20:33:10 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-10-03 22:09:28 +0200
commit380be9f1fd713dbcee91f12f18060d6b3ff4819e (patch)
tree6b0dc459f63b0d6ccf3c529137fd2c2ed3351826 /phpBB/phpbb/passwords
parent722639a0e213e905cfb4a01aa54e638f7670ba63 (diff)
downloadforums-380be9f1fd713dbcee91f12f18060d6b3ff4819e.tar
forums-380be9f1fd713dbcee91f12f18060d6b3ff4819e.tar.gz
forums-380be9f1fd713dbcee91f12f18060d6b3ff4819e.tar.bz2
forums-380be9f1fd713dbcee91f12f18060d6b3ff4819e.tar.xz
forums-380be9f1fd713dbcee91f12f18060d6b3ff4819e.zip
[ticket/14733] Make sure detect_algorithm() works correctly and add tests
detect_algorithm() returned array() if an algorithm prefix was more than 2 characters long. This might have been invalid for other prefixes. In order to correctly cope with other prefixes, another check for a backslash in the prefix definitino has been added. This was discovered while writing the tests for the newly added interface. PHPBB3-14733
Diffstat (limited to 'phpBB/phpbb/passwords')
-rw-r--r--phpBB/phpbb/passwords/manager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/passwords/manager.php b/phpBB/phpbb/passwords/manager.php
index 6c3ef4c477..fad76a9fe5 100644
--- a/phpBB/phpbb/passwords/manager.php
+++ b/phpBB/phpbb/passwords/manager.php
@@ -174,7 +174,7 @@ class manager
// Be on the lookout for multiple hashing algorithms
// 2 is correct: H\2a > 2, H\P > 2
- if (strlen($match[1]) > 2)
+ if (strlen($match[1]) > 2 && strpos($match[1], '\\') !== false)
{
$hash_types = explode('\\', $match[1]);
$return_ary = array();