mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Show warning when saving session if a pipe character is used in one of the $_SESSION keys Fixes #18634
14 lines
361 B
PHP
14 lines
361 B
PHP
--TEST--
|
|
GH-18634 (Using pipe character in session variable key causes session data to be removed)
|
|
--EXTENSIONS--
|
|
session
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
session_start();
|
|
$_SESSION['foo|bar'] = 'value';
|
|
?>
|
|
--EXPECT--
|
|
Warning: PHP Request Shutdown: Failed to write session data. Data contains invalid key "foo|bar" in Unknown on line 0
|