summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2002-08-31 10:53:12 +0200
committerbugreport%peshkin.net <>2002-08-31 10:53:12 +0200
commit5ac32582430a259ef71ea21d68affcd55aad31e8 (patch)
tree20b6b7ecbe15d03be5ea9a7ec3508a5672678caa
parentaefeff9d9fe53225e9626a411b83dfc1a5adc181 (diff)
downloadbugzilla-5ac32582430a259ef71ea21d68affcd55aad31e8.tar.gz
bugzilla-5ac32582430a259ef71ea21d68affcd55aad31e8.tar.xz
Bug 121419 - If multiple cookies exist, the least significant is assigned.
2xr = bbaetz Also fixes Duplicate Bug 165685 When switching from no cookiepath to using cookiepath, old cookie gets in the way
-rw-r--r--CGI.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/CGI.pl b/CGI.pl
index 8f412665e..a0a0cfd72 100644
--- 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} = "";
}