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