Don't try regexp on sn missing salt

This commit is contained in:
Jamie Cameron
2014-05-25 09:37:14 -07:00
parent 7c9e870b2e
commit 0e1ba9d0f9

View File

@@ -171,7 +171,7 @@ sub encrypt_blowfish
my ($passwd, $salt) = @_;
my ($plain, $base64) = ("", "");
eval "use Crypt::Eksblowfish::Bcrypt";
if ($salt !~ /^\$2a\$/) {
if ($salt && $salt !~ /^\$2a\$/) {
# Invalid salt for Blowfish
$salt = undef;
}