File tree 2 files changed +16
-5
lines changed 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
GH-18634 (Using pipe character in session variable key causes session data to be removed)
3
- --INI--
4
3
--EXTENSIONS--
5
4
session
6
5
--SKIPIF--
7
6
<?php include ('skipif.inc ' ); ?>
8
7
--FILE--
9
8
<?php
10
- ob_start ();
11
9
session_start ();
12
10
$ _SESSION ['foo|bar ' ] = 'value ' ;
13
- ob_end_clean ();
14
11
?>
15
- --EXPECTF --
16
- Warning: PHP Request Shutdown: Failed to write session data. Data contains invalid key "foo|bar". in Unknown on line 0
12
+ --EXPECT --
13
+ Warning: PHP Request Shutdown: Failed to write session data. Data contains invalid key "foo|bar" in Unknown on line 0
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-18634 (Using pipe character in session variable key causes session data to be removed - explicit session write)
3
+ --EXTENSIONS--
4
+ session
5
+ --SKIPIF--
6
+ <?php include ('skipif.inc ' ); ?>
7
+ --FILE--
8
+ <?php
9
+ session_start ();
10
+ $ _SESSION ['foo|bar ' ] = 'value ' ;
11
+ session_write_close ()
12
+ ?>
13
+ --EXPECTF--
14
+ Warning: session_write_close(): Failed to write session data. Data contains invalid key "foo|bar" in %s on line %d
You can’t perform that action at this time.
0 commit comments