From: jocuri%softhome.net <> Date: Thu, 21 Oct 2004 03:58:59 +0000 (+0000) Subject: Patch for bug 232155: Remove uninitialized value warning from Pperl's Cookie.pm and... X-Git-Tag: bugzilla-2.18rc3~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d084582ef240376f7f8a6a35fd94a1bf7b42c2b;p=thirdparty%2Fbugzilla.git Patch for bug 232155: Remove uninitialized value warning from Pperl's Cookie.pm and unify code by removing redundancy; patch by Christian Reis backported to 2.18 by Rob Siklos ; r=vladd,kiko, a=justdave. --- diff --git a/Bugzilla/Auth/CGI.pm b/Bugzilla/Auth/CGI.pm index 471e538e94..0a1a331f19 100644 --- a/Bugzilla/Auth/CGI.pm +++ b/Bugzilla/Auth/CGI.pm @@ -167,13 +167,7 @@ sub login { # The account may be disabled if ($authres == AUTH_DISABLED) { - # Clear the cookie - - $cgi->send_cookie(-name => 'Bugzilla_login', - -expires => "Tue, 15-Sep-1998 21:49:00 GMT"); - $cgi->send_cookie(-name => 'Bugzilla_logincookie', - -expires => "Tue, 15-Sep-1998 21:49:00 GMT"); - + clear_browser_cookies(); # and throw a user error ThrowUserError("account_disabled", {'disabled_reason' => $extra}); @@ -222,8 +216,10 @@ sub logout { sub clear_browser_cookies { my $cgi = Bugzilla->cgi; $cgi->send_cookie(-name => "Bugzilla_login", + -value => "", -expires => "Tue, 15-Sep-1998 21:49:00 GMT"); $cgi->send_cookie(-name => "Bugzilla_logincookie", + -value => "", -expires => "Tue, 15-Sep-1998 21:49:00 GMT"); }