ID: 36459 User updated by: muhtarov at oviont dot ru Reported By: muhtarov at oviont dot ru -Status: Bogus +Status: Open Bug Type: Session related Operating System: Windows 2000 SP4 PHP Version: 5.1.2 New Comment:
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) Previous Comments: ------------------------------------------------------------------------ [2006-02-22 16:41:04] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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> ------------------------------------------------------------------------ [2006-02-20 15:25:28] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ 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