From ac1f49a8d936a91831162bafda0dd7236ee95108 Mon Sep 17 00:00:00 2001 From: "dkl%redhat.com" <> Date: Fri, 12 Sep 2008 20:10:11 +0000 Subject: Bug 453767 - Passwords containing wide characters causes system error Patch by David Lawrence - a/r=mkanat --- Bugzilla/Util.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 9ff810b4f..defa15270 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -480,6 +480,11 @@ sub bz_crypt { $salt .= $saltchars[rand(64)]; } + # Wide characters cause crypt to die + if (Bugzilla->params->{'utf8'}) { + utf8::encode($password) if utf8::is_utf8($password); + } + # Crypt the password. my $cryptedpassword = crypt($password, $salt); -- cgit v1.2.3-24-g4f1b