diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-22 12:34:54 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-22 12:35:23 +0100 |
commit | 6dcd640f35a88bfc0f07b056ef47e2ff9c366ffc (patch) | |
tree | a63f79a2e7f6e2eec01b962fa6c770416b392ac3 /ext/session/tests | |
parent | ab989441957956522c1663f1a0662067afbfdb6c (diff) | |
parent | d7c98ca1ac10ee0461f332f21e548649dc0e51c9 (diff) | |
download | php-git-6dcd640f35a88bfc0f07b056ef47e2ff9c366ffc.tar.gz |
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80774: session_name() problem with backslash
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) |