Commit 1d6e06b2 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1003852: Digest::SHA 5.82 and newer always croak on wide characters,…

Bug 1003852: Digest::SHA 5.82 and newer always croak on wide characters, preventing users with Unicode passwords from logging in r/a=glob
parent 2234f68d
......@@ -628,13 +628,13 @@ sub bz_crypt {
$algorithm = $1;
}
# Wide characters cause crypt and Digest to die.
if (Bugzilla->params->{'utf8'}) {
utf8::encode($password) if utf8::is_utf8($password);
}
my $crypted_password;
if (!$algorithm) {
# Wide characters cause crypt to die
if (Bugzilla->params->{'utf8'}) {
utf8::encode($password) if utf8::is_utf8($password);
}
# Crypt the password.
$crypted_password = crypt($password, $salt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment