From 5f396a2d7759e5ffce3cf326a912dde09a5fb1a1 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 29 Dec 2017 14:44:58 +0300 Subject: [PATCH] Fix "wide character in subroutine entry" --- Bugzilla/Util.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index ea8dbc600..1a8a8b362 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -625,15 +625,15 @@ sub bz_crypt $algorithm = $1; } + # Wide characters cause crypt 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);