diff options
Diffstat (limited to 'ext')
4 files changed, 30 insertions, 2 deletions
diff --git a/ext/standard/tests/general_functions/bug60227_1.phpt b/ext/standard/tests/general_functions/bug60227_1.phpt index f95a061d2c..8efe222ada 100644 --- a/ext/standard/tests/general_functions/bug60227_1.phpt +++ b/ext/standard/tests/general_functions/bug60227_1.phpt @@ -10,7 +10,7 @@ header("X-Foo5: e\rSet-Cookie: ID=123"); echo 'foo'; ?> --EXPECTF-- -Warning: Header may not contain more than a single header, new line detected. in %s on line %d +Warning: Header may not contain more than a single header, new line detected in %s on line %d foo --EXPECTHEADERS-- X-Foo1: a diff --git a/ext/standard/tests/general_functions/bug60227_2.phpt b/ext/standard/tests/general_functions/bug60227_2.phpt index fd383f3b59..995c364eea 100644 --- a/ext/standard/tests/general_functions/bug60227_2.phpt +++ b/ext/standard/tests/general_functions/bug60227_2.phpt @@ -7,7 +7,7 @@ header("X-Foo6: e\rSet-Cookie: ID=123\n d"); echo 'foo'; ?> --EXPECTF-- -Warning: Header may not contain more than a single header, new line detected. in %s on line %d +Warning: Header may not contain more than a single header, new line detected in %s on line %d foo --EXPECTHEADERS-- X-foo: e diff --git a/ext/standard/tests/general_functions/bug60227_3.phpt b/ext/standard/tests/general_functions/bug60227_3.phpt new file mode 100644 index 0000000000..8cba9b8aec --- /dev/null +++ b/ext/standard/tests/general_functions/bug60227_3.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #60227 (header() cannot detect the multi-line header with CR), \0 before \n +--FILE-- +<?php +header("X-foo: e\n foo"); +header("X-Foo6: e\0Set-Cookie: ID=\n123\n d"); +echo 'foo'; +?> +--EXPECTF-- +Warning: Header may not contain NUL bytes in %s on line %d +foo +--EXPECTHEADERS-- +X-foo: e +foo diff --git a/ext/standard/tests/general_functions/bug60227_4.phpt b/ext/standard/tests/general_functions/bug60227_4.phpt new file mode 100644 index 0000000000..d5e2573d89 --- /dev/null +++ b/ext/standard/tests/general_functions/bug60227_4.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #60227 (header() cannot detect the multi-line header with CR), CRLF +--FILE-- +<?php +header("X-foo: e\r\n foo"); +header("X-foo: e\r\nfoo"); +echo 'foo'; +?> +--EXPECTF-- +Warning: Header may not contain more than a single header, new line detected in %s on line %d +foo +--EXPECTHEADERS-- +X-foo: e + foo |
