Fixed blowfish hashing
authorJamie Cameron <jcameron@webmin.com>
Wed, 25 Mar 2009 16:55:03 +0000 (16:55 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 25 Mar 2009 16:55:03 +0000 (16:55 +0000)
useradmin/CHANGELOG
useradmin/md5-lib.pl

index 87a321b..0af4276 100644 (file)
@@ -58,3 +58,4 @@ Added support for Blowfish password hashing, which can be enabled on the Module
 Converted commands in the module's API file to POD format, and added more details about each function.
 ---- Changes since 1.470 ----
 Fixed a bug that caused an empty shell to appear in the shells list for new users.
+Fixed the hashing format for Blowfish passwords, to put $2a$ at the start instead of $2$.
index daf7aa7..7df0812 100644 (file)
@@ -170,7 +170,7 @@ if (!$salt) {
                $base64 = Crypt::Eksblowfish::Bcrypt::en_base64($plain);
                }
        $base64 = substr($base64, 0, 22);
-       $salt = '$2$'.'08'.'$'.$base64;
+       $salt = '$2a$'.'08'.'$'.$base64;
        }
 return Crypt::Eksblowfish::Bcrypt::bcrypt($passwd, $salt);
 }