summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/auth.inc
diff options
context:
space:
mode:
authorDaniel Vinakovsky <dvinak@gmail.com>2016-01-16 00:03:24 -0500
committerDaniel Vinakovsky <dvinak@gmail.com>2016-01-16 00:03:24 -0500
commit4b737f6efe0eb7574851cc5024af43faf8c57fe2 (patch)
treeda828201eb7a30bce6a9fe848e4ec7b7ad7a4077 /src/etc/inc/auth.inc
parent9219378b588ce968702be2a7e153aa984504b6aa (diff)
downloadpfsense-4b737f6efe0eb7574851cc5024af43faf8c57fe2.zip
pfsense-4b737f6efe0eb7574851cc5024af43faf8c57fe2.tar.gz
compatibility with freebsd
Diffstat (limited to 'src/etc/inc/auth.inc')
-rwxr-xr-xsrc/etc/inc/auth.inc9
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 = '';
OpenPOWER on IntegriCloud