diff options
-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 9bcb6962d..4f0711b7e 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -624,13 +624,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); } |