diff options
author | Pierre Joye <pajoye@php.net> | 2011-07-22 11:56:20 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-07-22 11:56:20 +0000 |
commit | 45420bb6693baa76794df96ae6a8f8cdd7e09ccb (patch) | |
tree | d382ab94b5c598da8b88a57f3f075f34f1da0f5e /tests | |
parent | 7c90a9daa8beb96cab012549a7700f8ca607efe1 (diff) | |
download | php-git-45420bb6693baa76794df96ae6a8f8cdd7e09ccb.tar.gz |
- remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ, missing tests changes in 5.4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/023.phpt | 2 | ||||
-rw-r--r-- | tests/basic/024.phpt | 1 | ||||
-rw-r--r-- | tests/basic/025.phpt | 1 | ||||
-rw-r--r-- | tests/basic/026.phpt | 1 | ||||
-rw-r--r-- | tests/basic/027.phpt | 1 | ||||
-rw-r--r-- | tests/basic/bug46313-win.phpt | 65 | ||||
-rw-r--r-- | tests/basic/bug46313.phpt | 54 | ||||
-rw-r--r-- | tests/basic/bug46759.phpt | 20 | ||||
-rw-r--r-- | tests/security/magic_quotes_gpc.phpt | 13 |
9 files changed, 65 insertions, 93 deletions
diff --git a/tests/basic/023.phpt b/tests/basic/023.phpt index 4eb698fa05..181745ea5b 100644 --- a/tests/basic/023.phpt +++ b/tests/basic/023.phpt @@ -1,7 +1,5 @@ --TEST-- Cookies test#2 ---INI-- -magic_quotes_gpc=0 --COOKIE-- c o o k i e=value; c o o k i e= v a l u e ;;c%20o+o k+i%20e=v;name="value","value",UEhQIQ==;UEhQIQ==foo --FILE-- diff --git a/tests/basic/024.phpt b/tests/basic/024.phpt index 847eeac824..497d3514e0 100644 --- a/tests/basic/024.phpt +++ b/tests/basic/024.phpt @@ -1,7 +1,6 @@ --TEST-- Test HTTP_RAW_POST_DATA creation --INI-- -magic_quotes_gpc=0 always_populate_raw_post_data=1 --POST-- a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3 diff --git a/tests/basic/025.phpt b/tests/basic/025.phpt index bafcac8091..58191bcd61 100644 --- a/tests/basic/025.phpt +++ b/tests/basic/025.phpt @@ -1,7 +1,6 @@ --TEST-- Test HTTP_RAW_POST_DATA with excessive post length --INI-- -magic_quotes_gpc=0 always_populate_raw_post_data=1 post_max_size=1K --POST-- diff --git a/tests/basic/026.phpt b/tests/basic/026.phpt index 957aa1972c..b98a31f430 100644 --- a/tests/basic/026.phpt +++ b/tests/basic/026.phpt @@ -1,7 +1,6 @@ --TEST-- Registration of HTTP_RAW_POST_DATA due to unknown content-type --INI-- -magic_quotes_gpc=0 always_populate_raw_post_data=0 --POST_RAW-- Content-Type: unknown/type diff --git a/tests/basic/027.phpt b/tests/basic/027.phpt index ae5d78d50d..aa001f65a3 100644 --- a/tests/basic/027.phpt +++ b/tests/basic/027.phpt @@ -1,7 +1,6 @@ --TEST-- Handling of max_input_nesting_level being reached --INI-- -magic_quotes_gpc=0 always_populate_raw_post_data=0 display_errors=0 max_input_nesting_level=10 diff --git a/tests/basic/bug46313-win.phpt b/tests/basic/bug46313-win.phpt index 457e5eb7b3..e588bec767 100644 --- a/tests/basic/bug46313-win.phpt +++ b/tests/basic/bug46313-win.phpt @@ -5,6 +5,71 @@ Bug #46313 (Magic quotes broke $_FILES) --INI-- magic_quotes_gpc=1 file_uploads=1 +register_globals=1 +--POST_RAW-- +Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="o1'file"; filename="o1'file.png" +Content-Type: text/plain-file1 + +1 +-----------------------------20896060251896012921717172737 +Content-Disposition: form-data; name="o2'file"; filename="o2'file2.txt" +Content-Type: text/plain-file2 + +2 +-----------------------------20896060251896012921717172737-- +--FILE-- +<?php +var_dump($_FILES); +var_dump($GLOBALS["o1\'file_name"]); +var_dump($GLOBALS["o1\'file_name"] === $_FILES["o1\'file"]["name"]); +var_dump($GLOBALS["o1\'file"]); +var_dump($GLOBALS["o1\'file"] === $_FILES["o1\'file"]["tmp_name"]); +?> +--EXPECTF-- +array(2) { + ["o1\'file"]=> + array(5) { + ["name"]=> + string(12) "o1" + ["type"]=> + string(16) "text/plain-file1" + ["tmp_name"]=> + string(14) "%s" + ["error"]=> + int(0) + ["size"]=> + int(1) + } + ["o2\'file"]=> + array(5) { + ["name"]=> + string(13) "o2" + ["type"]=> + string(16) "text/plain-file2" + ["tmp_name"]=> + string(14) "%s" + ["error"]=> + int(0) + ["size"]=> + int(1) + } +} +string(12) "o1" +bool(true) +string(%d) "%s" +bool(true) +Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 +Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 + +--TEST-- +Bug #46313 (Magic quotes broke $_FILES) +--SKIPIF-- +<?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows-only test"); ?> +--INI-- +magic_quotes_gpc=1 +file_uploads=1 --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 diff --git a/tests/basic/bug46313.phpt b/tests/basic/bug46313.phpt index 6c1f65c935..e69de29bb2 100644 --- a/tests/basic/bug46313.phpt +++ b/tests/basic/bug46313.phpt @@ -1,54 +0,0 @@ ---TEST-- -Bug #46313 (Magic quotes broke $_FILES) ---SKIPIF-- -<?php if(substr(PHP_OS, 0, 3) == "WIN") die("skip non-Windows test"); ?> ---INI-- -magic_quotes_gpc=1 -file_uploads=1 -display_errors=0 ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o1'file"; filename="o1'file.png" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o2'file"; filename="o2'file2.txt" -Content-Type: text/plain-file2 - -2 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -?> ---EXPECTF-- -array(2) { - ["o1\'file"]=> - array(5) { - ["name"]=> - string(12) "o1\'file.png" - ["type"]=> - string(16) "text/plain-file1" - ["tmp_name"]=> - string(%d) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } - ["o2\'file"]=> - array(5) { - ["name"]=> - string(13) "o2\'file2.txt" - ["type"]=> - string(16) "text/plain-file2" - ["tmp_name"]=> - string(%d) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } -} diff --git a/tests/basic/bug46759.phpt b/tests/basic/bug46759.phpt index d35cd534c2..e69de29bb2 100644 --- a/tests/basic/bug46759.phpt +++ b/tests/basic/bug46759.phpt @@ -1,20 +0,0 @@ ---TEST-- -Testing magic_quotes_gpc ---INI-- -display_errors=0 -magic_quotes_gpc=1 ---GET-- -a='&b="&c=\" ---FILE-- -<?php - -foreach ($_GET AS $key => $value) -{ - echo $key . ": " . $value . "\n"; -} - -?> ---EXPECT-- -a: \' -b: \" -c: \\\" diff --git a/tests/security/magic_quotes_gpc.phpt b/tests/security/magic_quotes_gpc.phpt index 382ab94d2d..e69de29bb2 100644 --- a/tests/security/magic_quotes_gpc.phpt +++ b/tests/security/magic_quotes_gpc.phpt @@ -1,13 +0,0 @@ ---TEST-- -Test if magic_quotes_gpc works as expected ---INI-- -display_errors=0 -magic_quotes_gpc=1 ---GET-- -a=abc'"%00123 ---FILE-- -<?php -echo $_GET['a'],"\n"; -?> ---EXPECT-- -abc\'\"\0123 |