#36459 [Opn->Csd]: Incorrect adding PHPSESSID to links, which contains \r\n
| From: | iliaa@php.net | Date: | Tue, 28 Feb 2006 14:47:27 +0000 |
| Subject: | #36459 [Opn->Csd]: Incorrect adding PHPSESSID to links, which contains \r\n | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93761@lists.php.net to get a copy of this message | ||
ID: 36459
Updated by: iliaa@php.net
Reported By: muhtarov at oviont dot ru
-Status: Open
+Status: Closed
Bug Type: Session related
Operating System: Windows 2000 SP4
PHP Version: 5.1.2
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-02-26 12:34:02] muhtarov at oviont dot ru
Can you download this file and repeat bug test?
Please, use only binary mode!
It's important to save \r\n newlines!
http://tanyshu.ru/download/index.php.gz (412
bytes)
------------------------------------------------------------------------
[2006-02-22 16:41:04] iliaa@php.net
With the latest PHP version your reproduce script results in the
following (correct) output:
<html>
<head>
<title>Bug #36459 Incorrect adding PHPSESSID to links, which
contains \r\n</title>
</head>
<body>
<p>See source html code</p>
<a
href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=78111a67c95dcfc3569705b24296b243"
style="font: normal 11pt Times New Roman">incorrect link</a><br
/>
<br />
<a
href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=78111a67c95dcfc3569705b24296b243"
style="font: normal 11pt Times New Roman">correct link</a>
</body>
------------------------------------------------------------------------
[2006-02-22 10:13:16] muhtarov at oviont dot ru
I used CVS snapshot.
The problem still exists.
For example, I have link:
<a href="/bug/?a=1&b=2"
class="test">test</a>
Be attentive, after attribute "href" we have \r\n\x20.
It is important!
After parsing by PHP we have incorrect tag:
<a href="/bug/?a=1&b=2"
&sid=44hj6b9kp095tocn15hqog4l73
class="test">test</a>
But should be:
<a href="/bug/?a=1&b=2&sid=44hj6b9kp095tocn15hqog4l73"
class="test">test</a>
--
Rinat Nasibullin
------------------------------------------------------------------------
[2006-02-21 13:58:52] mike@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
Works as expected for me.
------------------------------------------------------------------------
[2006-02-21 09:27:18] muhtarov at oviont dot ru
<?php
/**
* Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n
*
* @link http://bugs.php.net/bug.php?id=36459
* @charset ANSI
*/
error_reporting(E_ALL);
ini_set('session.use_trans_sid', 1);
ini_set('session.use_cookies', 0);
ini_set('session.name', 'sid');
session_start();
?>
<html>
<head>
<title>Bug #36459 Incorrect adding PHPSESSID to links, which
contains \r\n</title>
</head>
<body>
<p>See source html code</p>
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
style="font: normal 11pt Times New Roman">incorrect link</a><br
/>
<br />
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
style="font: normal 11pt Times New Roman">correct link</a>
</body>
</html>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/36459
--
Edit this bug report at http://bugs.php.net/?id=36459&edit=1