diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/etc/inc/auth.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index 6e6600c..af252d8 100755 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -614,6 +614,15 @@ function local_user_set_password(&$user, $password) { $user['md5-hash'] = "REMOVED"; $user['bcrypt-hash'] = password_hash($password,PASSWORD_BCRYPT); + // Maintain compatibility with FreeBSD + // https://reviews.freebsd.org/D2742 + // change $2y$ prefix to $2b$ + + if ($user['bcrypt-hash'][2] == "y") { + $user['bcrypt-hash'][2] = "b"; + } + + // Converts ascii to unicode. $astr = (string) $password; $ustr = ''; |