php-src/ext/session/tests/bug50308.phpt
Arpad Ray e6ae977082 Fixed bug #50308 - session id not appended properly for empty anchor tags
The issue was actually because a lack of space before a "/" marking the tag
as empty. This was being swallowed in the rule for unquoted values. Fixed
by making that rule exclude quotes (as per spec anyway).
2013-07-17 16:07:26 +01:00

31 lines
631 B
PHP

--TEST--
Bug #50308 (session id not appended properly for empty anchor tags)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.name=PHPSESSID
session.save_handler=files
session.use_trans_sid=1
session.use_only_cookies=0
--FILE--
<?php
@session_start();
?>
<a href=""/>
<a href="" />
<a href="foo"/>
<a href="foo" />
<a href=foo/>
<a href=/>
<a href=?foo=bar/>
<a href="?foo=bar"/>
--EXPECTF--
<a href="?PHPSESSID=%s"/>
<a href="?PHPSESSID=%s" />
<a href="foo?PHPSESSID=%s"/>
<a href="foo?PHPSESSID=%s" />
<a href=foo/?PHPSESSID=%s>
<a href=/?PHPSESSID=%s>
<a href=?foo=bar/&PHPSESSID=%s>
<a href="?foo=bar&PHPSESSID=%s"/>