]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 121419: Use the most-specific cookie if more than one exists with different cooki...
authorjustdave%syndicomm.com <>
Sun, 18 Jan 2004 09:41:27 +0000 (09:41 +0000)
committerjustdave%syndicomm.com <>
Sun, 18 Jan 2004 09:41:27 +0000 (09:41 +0000)
Patch by Joel Peshkin <bugreport@peshkin.net>
r= bbaetz, a= justdave

CGI.pl

diff --git a/CGI.pl b/CGI.pl
index b3e879a2d8d928729ed85d77eaae237d2e88efdc..5b093d0413f1e7010abc04f795ae32bfe3459725 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -1129,7 +1129,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} = "";
         }