bug36459.phpt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. Bug #31454 (Incorrect adding PHPSESSID to links, which contains \r\n)
  3. --EXTENSIONS--
  4. session
  5. --SKIPIF--
  6. <?php include('skipif.inc'); ?>
  7. --INI--
  8. session.use_trans_sid=1
  9. session.use_cookies=0
  10. session.use_only_cookies=0
  11. session.name=sid
  12. --FILE--
  13. <?php
  14. error_reporting(E_ALL);
  15. session_start();
  16. # Do not remove \r from this tests, they are essential!
  17. ?>
  18. <html>
  19. <head>
  20. <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
  21. </head>
  22. <body>
  23. <p>See source html code</p>
  24. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
  25. style="font: normal 11pt Times New Roman">incorrect link</a><br />
  26. <br />
  27. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2" style="font: normal 11pt Times New Roman">correct link</a>
  28. </body>
  29. </html>
  30. --EXPECTF--
  31. <html>
  32. <head>
  33. <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
  34. </head>
  35. <body>
  36. <p>See source html code</p>
  37. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s"
  38. style="font: normal 11pt Times New Roman">incorrect link</a><br />
  39. <br />
  40. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s" style="font: normal 11pt Times New Roman">correct link</a>
  41. </body>
  42. </html>