Skip to content

Commit b594949

Browse files
committed
Merge branch 'PHP-5.5'
* PHP-5.5: regenerate url scanner Fixed bug #50308 - session id not appended properly for empty anchor tags
2 parents fb53871 + 31edf4d commit b594949

File tree

3 files changed

+189
-173
lines changed

3 files changed

+189
-173
lines changed

ext/session/tests/bug50308.phpt

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--TEST--
2+
Bug #50308 (session id not appended properly for empty anchor tags)
3+
--SKIPIF--
4+
<?php include('skipif.inc'); ?>
5+
--INI--
6+
session.name=PHPSESSID
7+
session.save_handler=files
8+
session.use_trans_sid=1
9+
session.use_only_cookies=0
10+
--FILE--
11+
<?php
12+
@session_start();
13+
?>
14+
<a href=""/>
15+
<a href="" />
16+
<a href="foo"/>
17+
<a href="foo" />
18+
<a href=foo/>
19+
<a href=/>
20+
<a href=?foo=bar/>
21+
<a href="?foo=bar"/>
22+
--EXPECTF--
23+
<a href="?PHPSESSID=%s"/>
24+
<a href="?PHPSESSID=%s" />
25+
<a href="foo?PHPSESSID=%s"/>
26+
<a href="foo?PHPSESSID=%s" />
27+
<a href=foo/?PHPSESSID=%s>
28+
<a href=/?PHPSESSID=%s>
29+
<a href=?foo=bar/&PHPSESSID=%s>
30+
<a href="?foo=bar&PHPSESSID=%s"/>

0 commit comments

Comments
 (0)