ID:               36459
 User updated by:  muhtarov at oviont dot ru
 Reported By:      muhtarov at oviont dot ru
-Status:           Feedback
+Status:           Open
 Bug Type:         Session related
 Operating System: Windows 2000 SP4
 PHP Version:      5.1.2
 New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[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.



------------------------------------------------------------------------

[2006-02-20 10:39:30] muhtarov at oviont dot ru

Description:
------------
There is problem while adding PHPSESSID to links, which contain \r\n
after some attribute.

Part of my .htaccess file:

php_value session.use_trans_sid 1
php_value session.name "sid"


Reproduce code:
---------------
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
&sid=brvsemsd03-ynw9wn4
style="font: normal 9pt Times New Roman">test</a>

Expected result:
----------------
<a
href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=brvsemsd03-ynw9wn4"
style="font: normal 9pt Times New Roman">test</a>



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36459&edit=1

Reply via email to