diff options
| author | Pierre Joye <pajoye@php.net> | 2011-07-22 11:25:30 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2011-07-22 11:25:30 +0000 |
| commit | cc1c7af0375db5b7ad2c7752569b925cc3372377 (patch) | |
| tree | 0bf43f30b0e5a4286a01da613bf901b92f9f9b3c /tests/basic | |
| parent | 5ef9ab3b03867e8644b5140d618842199ef69202 (diff) | |
| download | php-git-cc1c7af0375db5b7ad2c7752569b925cc3372377.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
Diffstat (limited to 'tests/basic')
| -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 |
8 files changed, 65 insertions, 80 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: \\\" |
