Commit 61858962 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 748095: Bugzilla crashes when the shutdownhtml parameter is set and using a…

Bug 748095: Bugzilla crashes when the shutdownhtml parameter is set and using a non-cookie based authentication method r=dkl a=justdave
parent 9e4f7465
......@@ -165,10 +165,8 @@ sub init_page {
print Bugzilla->cgi->header(-status => 503,
-retry_after => SHUTDOWNHTML_RETRY_AFTER);
}
my $t_output;
$template->process("global/message.$extension.tmpl", $vars, \$t_output)
$template->process("global/message.$extension.tmpl", $vars)
|| ThrowTemplateError($template->error);
say $t_output;
exit;
}
}
......
......@@ -108,8 +108,8 @@ sub logout {
if ($cookie) {
push(@login_cookies, $cookie->value);
}
else {
push(@login_cookies, $cgi->cookie("Bugzilla_logincookie"));
elsif ($cookie = $cgi->cookie('Bugzilla_logincookie')) {
push(@login_cookies, $cookie);
}
# If we are a webservice using a token instead of cookie
......@@ -118,7 +118,8 @@ sub logout {
push(@login_cookies, $login_token->{'login_token'});
}
return if !@login_cookies;
# Make sure that @login_cookies is not empty to not break SQL statements.
push(@login_cookies, '') unless @login_cookies;
# These queries use both the cookie ID and the user ID as keys. Even
# though we know the userid must match, we still check it in the SQL
......
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