Commit c23619f1 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 477513: md5_hex() fails if a saved search has UTF8 characters in it - Patch…

Bug 477513: md5_hex() fails if a saved search has UTF8 characters in it - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
parent f65a3e7e
......@@ -180,7 +180,13 @@ sub issue_hash_token {
# The concatenated string is of the form
# token creation time + site-wide secret + user ID + data
my @args = ($time, Bugzilla->localconfig->{'site_wide_secret'}, Bugzilla->user->id, @$data);
my $token = md5_hex(join('*', @args));
my $token = join('*', @args);
# Wide characters cause md5_hex() to die.
if (Bugzilla->params->{'utf8'}) {
utf8::encode($token) if utf8::is_utf8($token);
}
$token = md5_hex($token);
# Prepend the token creation time, unencrypted, so that the token
# lifetime can be validated.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment