]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 121419 - If multiple cookies exist, the least significant is assigned.
authorbugreport%peshkin.net <>
Sat, 31 Aug 2002 08:53:12 +0000 (08:53 +0000)
committerbugreport%peshkin.net <>
Sat, 31 Aug 2002 08:53:12 +0000 (08:53 +0000)
2xr = bbaetz

Also fixes Duplicate Bug 165685 When switching from no cookiepath to using cookiepath, old cookie gets in the way

CGI.pl

diff --git a/CGI.pl b/CGI.pl
index 8f412665ea15e687768cd6df919e667b42ba08b4..a0a0cfd72d00bfd5d9436fc5553d44b54f5d2680 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -1064,7 +1064,9 @@ if (defined $ENV{"HTTP_COOKIE"}) {
     foreach my $pair (split(/;/, $ENV{"HTTP_COOKIE"})) {
         $pair = trim($pair);
         if ($pair =~ /^([^=]*)=(.*)$/) {
-            $::COOKIE{$1} = $2;
+            if (!exists($::COOKIE{$1})) {
+                $::COOKIE{$1} = $2;
+            }
         } else {
             $::COOKIE{$pair} = "";
         }