diff options
Diffstat (limited to 'ext/session/tests')
| -rw-r--r-- | ext/session/tests/bug80774.phpt | 15 | ||||
| -rw-r--r-- | ext/session/tests/session_name_variation1.phpt | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/ext/session/tests/bug80774.phpt b/ext/session/tests/bug80774.phpt new file mode 100644 index 0000000000..2ce07263f2 --- /dev/null +++ b/ext/session/tests/bug80774.phpt @@ -0,0 +1,15 @@ +--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-- diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt index 71849de565..b9debaef2c 100644 --- a/ext/session/tests/session_name_variation1.phpt +++ b/ext/session/tests/session_name_variation1.phpt @@ -42,6 +42,8 @@ string(9) "PHPSESSID" bool(true) string(9) "PHPSESSID" string(9) "PHPSESSID" + +Warning: session_start(): session.name cannot contain any of the following '=,; \t\r\n\013\014' in %s on line %d bool(true) string(1) " " bool(true) @@ -49,6 +51,8 @@ string(1) " " Warning: session_name(): session.name "" cannot be numeric or empty in %s on line %d string(1) " " + +Warning: session_start(): session.name cannot contain any of the following '=,; \t\r\n\013\014' in %s on line %d bool(true) string(1) " " bool(true) |
