Bug 964113: Digest::SHA 5.82 and newer always croak on wide characters, preventing saved searched from being displayed

r=dkl a=justdave


git-svn-id: svn://10.0.0.236/trunk@265210 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-01-27 18:15:43 +00:00
parent bbfb368b3d
commit c3c9d1dc34
3 changed files with 8 additions and 1 deletions

View File

@ -1 +1 @@
8893 8894

View File

@ -168,6 +168,10 @@ sub issue_hash_token {
my @args = ($time, $user_id, @$data); my @args = ($time, $user_id, @$data);
my $token = join('*', @args); 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 = hmac_sha256_base64($token, Bugzilla->localconfig->{'site_wide_secret'});
$token =~ s/\+/-/g; $token =~ s/\+/-/g;
$token =~ s/\//_/g; $token =~ s/\//_/g;

View File

@ -61,6 +61,9 @@
<li>An error about <kbd>longdescs.comment_id</kbd> was thrown by MySQL 5.0 <li>An error about <kbd>longdescs.comment_id</kbd> was thrown by MySQL 5.0
and 5.1 when upgrading to Bugzilla 4.4 or 4.4.1. and 5.1 when upgrading to Bugzilla 4.4 or 4.4.1.
(<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=870369">[% terms.Bug %] 870369</a>)</li> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=870369">[% terms.Bug %] 870369</a>)</li>
<li>Saved searches containing Unicode characters in their name could not
be run if Digest::SHA 5.82 or newer is installed.
(<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=964113">[% terms.Bug %] 964113</a>)</li>
<li>A regression in Bugzilla 4.4.1 caused <kbd>email_in.pl</kbd> to fail <li>A regression in Bugzilla 4.4.1 caused <kbd>email_in.pl</kbd> to fail
with an "invalid token" error message. with an "invalid token" error message.
(<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=928331">[% terms.Bug %] 928331</a> and (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=928331">[% terms.Bug %] 928331</a> and