diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Util.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 75427af14..56685d109 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -626,13 +626,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); |