]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 748095: Bugzilla crashes when the shutdownhtml parameter is set and using a non...
authorFrédéric Buclin <LpSolit@gmail.com>
Sat, 21 Dec 2013 16:42:14 +0000 (17:42 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 21 Dec 2013 16:42:14 +0000 (17:42 +0100)
r=dkl a=justdave

Bugzilla.pm
Bugzilla/Auth/Persist/Cookie.pm

index 99fcbed4623a163978973256a6b45ae0a9f7301b..5344c8bc66569e59935b7cadb3015f53151f65c7 100644 (file)
@@ -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;
     }
 }
index 9681bcea256b93c8b34ac9c2ed3ab4e1b3e1b2e3..939a1ac9c5c7f7719abbba263966b01f7f40cdd3 100644 (file)
@@ -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