summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-19 14:46:32 +0100
committerAndrey Andreev <narf@devilix.net>2017-01-19 14:46:32 +0100
commit93141a13e77a88be044e4c7f51ba3c2a35bf0ccc (patch)
tree74c71eaa7f3217b142fa1a0c01a4f0999d5cdf64 /system
parent25461d8eac80c0f1242150f7316ec58ac14c5d39 (diff)
hash_pbkdf2() byte-safety again ... actually tell mbstring to use 8bit
Diffstat (limited to 'system')
-rw-r--r--system/core/compat/hash.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php
index 7eb292188..c65203aaf 100644
--- a/system/core/compat/hash.php
+++ b/system/core/compat/hash.php
@@ -174,7 +174,7 @@ if ( ! function_exists('hash_pbkdf2'))
}
$hash_length = defined('MB_OVERLOAD_STRING')
- ? mb_strlen(hash($algo, NULL, TRUE))
+ ? mb_strlen(hash($algo, NULL, TRUE), '8bit')
: strlen(hash($algo, NULL, TRUE));
empty($length) && $length = $hash_length;
@@ -248,7 +248,7 @@ if ( ! function_exists('hash_pbkdf2'))
}
return defined('MB_OVERLOAD_STRING')
- ? mb_substr($hash, 0, $length)
+ ? mb_substr($hash, 0, $length, '8bit')
: substr($hash, 0, $length);
}
}