mirror of
https://github.com/php/php-src.git
synced 2026-04-18 13:31:27 +02:00
Since we do no longer URL decode cookie names[1], we must not URL encode the session name. We need to prevent broken Set-Cookie headers, by rejecting names which contain invalid characters. [1] <http://git.php.net/?p=php-src.git;a=commit;h=6559fe912661ca5ce5f0eeeb591d928451428ed0> Closes GH-6711.
16 lines
304 B
PHP
16 lines
304 B
PHP
--TEST--
|
|
Bug #80774 (session_name() problem with backslash)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('session')) die("skip session extension not available");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
session_name("foo\\bar");
|
|
session_id('12345');
|
|
session_start();
|
|
?>
|
|
--EXPECTHEADERS--
|
|
Set-Cookie: foo\bar=12345; path=/
|
|
--EXPECT--
|