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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Mar 28 16:01:29 2024 UTC