php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #321 only 1 cookie of multiple ones sent to server gets parsed
Submitted: 1998-04-27 16:41 UTC Modified: 1998-04-30 18:20 UTC
From: sklar at student dot net Assigned:
Status: Closed Package: Other
PHP Version: 3.0 Latest CVS OS: Linux 2.0.30
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sklar at student dot net
New email:
PHP Version: OS:

 

 [1998-04-27 16:41 UTC] sklar at student dot net
If a browser sends more than one cookie to the server,
 only the first cookie sent gets parsed into a variable.

Reproduce with the following code:

---------
<? if ($set == 1) {
  SetCookie("first","apple");
  SetCookie("second","orange");
}

echo "[first:$first][second:$second]($HTTP_COOKIE)";
?>
<hr>
<? phpinfo(); ?>
-----------

when call it the first time with a query string of 
"set=1", I get two cookies sent to me, as expected.

When I try the page again, I get

[first:][second:orange](second=orange; first=apple)

as output. The other cookie is in $HTTP_COOKIE and
the output of phpinfo tells me:

HTTP Request Headers / Cookie is:
second=orange; first=apple;

but the value "apple" doesn't get parsed
into the variable "first".

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-30 18:20 UTC] zeev
Fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC