aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-06-27 14:25:50 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-09-14 13:53:44 +0200
commit16e5d0dc350fbeb15bf662757dba21bd0e729e8c (patch)
tree3fcbdbc58dce1d14df0cdc11c66585741e2f7030 /phpBB
parentab068799b1eb2039840d3fba2563a0203a5dd4ba (diff)
downloadforums-16e5d0dc350fbeb15bf662757dba21bd0e729e8c.tar
forums-16e5d0dc350fbeb15bf662757dba21bd0e729e8c.tar.gz
forums-16e5d0dc350fbeb15bf662757dba21bd0e729e8c.tar.bz2
forums-16e5d0dc350fbeb15bf662757dba21bd0e729e8c.tar.xz
forums-16e5d0dc350fbeb15bf662757dba21bd0e729e8c.zip
[feature/passwords] Fix minor code limitations in helper
These limitations caused it to only allow a specific input to combined hashes. PHPBB3-11610
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/crypto/helper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/crypto/helper.php b/phpBB/includes/crypto/helper.php
index 3db126d3b1..a65cacc73a 100644
--- a/phpBB/includes/crypto/helper.php
+++ b/phpBB/includes/crypto/helper.php
@@ -55,7 +55,8 @@ class phpbb_crypto_helper
{
preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $hash, $match);
$hash_settings = substr($hash, strpos($hash, $match[1]) + strlen($match[1]) + 1);
- foreach ($match as $cur_type)
+ $matches = explode('\\', $match[1]);
+ foreach ($matches as $cur_type)
{
$dollar_position = strpos($hash_settings, '$');
$output[] = substr($hash_settings, 0, ($dollar_position != false) ? $dollar_position : strlen($hash_settings));
@@ -112,7 +113,7 @@ class phpbb_crypto_helper
if ($type == 'prefix')
{
$data[$type] .= ($data[$type] !== '$') ? '\\' : '';
- $data[$type] .= $value;
+ $data[$type] .= str_replace('$', '', $value);
}
elseif ($type == 'settings')
{