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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 08:03:18 2022 UTC