From: justdave%syndicomm.com <> Date: Sun, 18 Jan 2004 09:41:27 +0000 (+0000) Subject: Bug 121419: Use the most-specific cookie if more than one exists with different cooki... X-Git-Tag: bugzilla-2.16.5~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dd371715389c9bbb703f0a3c898e7c56552a5e4;p=thirdparty%2Fbugzilla.git Bug 121419: Use the most-specific cookie if more than one exists with different cookiepaths. Should help ease login troubles related to the cookiepath setting. Patch by Joel Peshkin r= bbaetz, a= justdave --- diff --git a/CGI.pl b/CGI.pl index b3e879a2d8..5b093d0413 100644 --- 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} = ""; }