From: Frédéric Buclin Date: Mon, 27 Jan 2014 18:16:49 +0000 (+0100) Subject: Bug 964113: Digest::SHA 5.82 and newer always croak on wide characters, preventing... X-Git-Tag: bugzilla-4.4.2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c447ced5c241f63435e04447981e3e42b829871;p=thirdparty%2Fbugzilla.git Bug 964113: Digest::SHA 5.82 and newer always croak on wide characters, preventing saved searched from being displayed r=dkl a=justdave --- diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm index a924324dca..c7e9f645fa 100644 --- a/Bugzilla/Token.pm +++ b/Bugzilla/Token.pm @@ -171,6 +171,10 @@ sub issue_hash_token { my @args = ($time, $user_id, @$data); my $token = join('*', @args); + # Wide characters cause Digest::SHA to die. + if (Bugzilla->params->{'utf8'}) { + utf8::encode($token) if utf8::is_utf8($token); + } $token = hmac_sha256_base64($token, Bugzilla->localconfig->{'site_wide_secret'}); $token =~ s/\+/-/g; $token =~ s/\//_/g; diff --git a/template/en/default/pages/release-notes.html.tmpl b/template/en/default/pages/release-notes.html.tmpl index b047ffe565..1a10fa81fe 100644 --- a/template/en/default/pages/release-notes.html.tmpl +++ b/template/en/default/pages/release-notes.html.tmpl @@ -61,6 +61,9 @@
  • An error about longdescs.comment_id was thrown by MySQL 5.0 and 5.1 when upgrading to [% terms.Bugzilla %] 4.4 or 4.4.1. ([% terms.Bug %] 870369)
  • +
  • Saved searches containing Unicode characters in their name could not + be run if Digest::SHA 5.82 or newer is installed. + ([% terms.Bug %] 964113)
  • A regression in [% terms.Bugzilla %] 4.4.1 caused email_in.pl to fail with an "invalid token" error message. ([% terms.Bug %] 928331 and