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 { ...@@ -165,10 +165,8 @@ sub init_page {
print Bugzilla->cgi->header(-status => 503, print Bugzilla->cgi->header(-status => 503,
-retry_after => SHUTDOWNHTML_RETRY_AFTER); -retry_after => SHUTDOWNHTML_RETRY_AFTER);
} }
my $t_output; $template->process("global/message.$extension.tmpl", $vars)
$template->process("global/message.$extension.tmpl", $vars, \$t_output)
|| ThrowTemplateError($template->error); || ThrowTemplateError($template->error);
say $t_output;
exit; exit;
} }
} }
......
...@@ -108,8 +108,8 @@ sub logout { ...@@ -108,8 +108,8 @@ sub logout {
if ($cookie) { if ($cookie) {
push(@login_cookies, $cookie->value); push(@login_cookies, $cookie->value);
} }
else { elsif ($cookie = $cgi->cookie('Bugzilla_logincookie')) {
push(@login_cookies, $cgi->cookie("Bugzilla_logincookie")); push(@login_cookies, $cookie);
} }
# If we are a webservice using a token instead of cookie # If we are a webservice using a token instead of cookie
...@@ -118,7 +118,8 @@ sub logout { ...@@ -118,7 +118,8 @@ sub logout {
push(@login_cookies, $login_token->{'login_token'}); 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 # 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 # 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