From: Pierre Joye Date: Fri, 22 Jul 2011 11:56:20 +0000 (+0000) Subject: - remove magic quotes support, functions are kept (see the NEWS entry for the details... X-Git-Tag: php-5.4.0alpha3~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45420bb6693baa76794df96ae6a8f8cdd7e09ccb;p=php - 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 --- diff --git a/ext/exif/tests/bug34704.phpt b/ext/exif/tests/bug34704.phpt index b6b26de78d..7688ce861a 100755 --- a/ext/exif/tests/bug34704.phpt +++ b/ext/exif/tests/bug34704.phpt @@ -3,7 +3,6 @@ Bug #34704 (Infinite recursion due to corrupt JPEG) --SKIPIF-- --INI-- -magic_quotes_runtime=0 output_handler= zlib.output_compression=0 --FILE-- diff --git a/ext/exif/tests/exif002.phpt b/ext/exif/tests/exif002.phpt index 1b1220c600..2a70f2920c 100644 --- a/ext/exif/tests/exif002.phpt +++ b/ext/exif/tests/exif002.phpt @@ -3,7 +3,6 @@ Check for exif_thumbnail --SKIPIF-- --INI-- -magic_quotes_runtime=0 output_handler= zlib.output_compression=0 --FILE-- diff --git a/ext/exif/tests/exif006.phpt b/ext/exif/tests/exif006.phpt index 10458c083d..e69de29bb2 100644 --- a/ext/exif/tests/exif006.phpt +++ b/ext/exif/tests/exif006.phpt @@ -1,90 +0,0 @@ ---TEST-- -Check for exif_read_data, magic_quotes_runtime ---SKIPIF-- - ---INI-- -output_handler= -zlib.output_compression=0 -magic_quotes_runtime=1 ---FILE-- - ---EXPECTF-- -Deprecated: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0 -array(5) { - ["FILE"]=> - array(6) { - ["FileName"]=> - string(9) "test6.jpg" - ["FileDateTime"]=> - int(%d) - ["FileSize"]=> - int(1240) - ["FileType"]=> - int(2) - ["MimeType"]=> - string(10) "image/jpeg" - ["SectionsFound"]=> - string(33) "ANY_TAG, IFD0, THUMBNAIL, COMMENT" - } - ["COMPUTED"]=> - array(12) { - ["html"]=> - string(24) "width=\"1\" height=\"1\"" - ["Height"]=> - int(1) - ["Width"]=> - int(1) - ["IsColor"]=> - int(1) - ["ByteOrderMotorola"]=> - int(1) - ["UserComment"]=> - string(16) "Hallo \'Du\'+da!" - ["UserCommentEncoding"]=> - string(5) "ASCII" - ["Copyright"]=> - string(45) "Photo \"M. Boerger\"., Edited \'M. Boerger\'." - ["Copyright.Photographer"]=> - string(21) "Photo \"M. Boerger\"." - ["Copyright.Editor"]=> - string(22) "Edited \'M. Boerger\'." - ["Thumbnail.FileType"]=> - int(2) - ["Thumbnail.MimeType"]=> - string(10) "image/jpeg" - } - ["IFD0"]=> - array(2) { - ["Copyright"]=> - string(21) "Photo \"M. Boerger\"." - ["UserComment"]=> - string(5) "ASCII" - } - ["THUMBNAIL"]=> - array(2) { - ["JPEGInterchangeFormat"]=> - int(134) - ["JPEGInterchangeFormatLength"]=> - int(523) - } - ["COMMENT"]=> - array(3) { - [0]=> - string(13) "Comment \"1\"" - [1]=> - string(13) "Comment \'2\'" - [2]=> - string(13) "Comment #3end" - } -} diff --git a/ext/filter/tests/bug39763.phpt b/ext/filter/tests/bug39763.phpt index 36ee41561a..e69de29bb2 100644 --- a/ext/filter/tests/bug39763.phpt +++ b/ext/filter/tests/bug39763.phpt @@ -1,17 +0,0 @@ ---TEST-- -Bug #39763 (filter applies magic_quotes twice in parse_str()) ---INI-- -magic_quotes_gpc=1 -filter.default= ---FILE-- - ---EXPECT-- -Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 -\"probably a bug\" -\"probably a bug\" \ No newline at end of file diff --git a/ext/filter/tests/bug42718-2.phpt b/ext/filter/tests/bug42718-2.phpt index 13cd990d00..ed210681d3 100644 --- a/ext/filter/tests/bug42718-2.phpt +++ b/ext/filter/tests/bug42718-2.phpt @@ -4,7 +4,6 @@ Bug #42718 - 2 (unsafe_raw filter not applied when configured as default filter) --INI-- display_errors=0 -magic_quotes_gpc=1 filter.default=unsafe_raw filter.default_flags= --GET-- @@ -13,9 +12,7 @@ a=1%00 --EXPECT-- unsafe_raw -1\0 diff --git a/ext/filter/tests/bug42718.phpt b/ext/filter/tests/bug42718.phpt index d1ede3f7d2..ba56d3988a 100644 --- a/ext/filter/tests/bug42718.phpt +++ b/ext/filter/tests/bug42718.phpt @@ -5,7 +5,6 @@ FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags --SKIPIF-- --INI-- -magic_quotes_gpc=0 filter.default=unsafe_raw filter.default_flags=4 --GET-- diff --git a/ext/hash/tests/mhash_001.phpt b/ext/hash/tests/mhash_001.phpt index b2a92839be..5df0378259 100644 --- a/ext/hash/tests/mhash_001.phpt +++ b/ext/hash/tests/mhash_001.phpt @@ -1,7 +1,5 @@ --TEST-- mhash() test ---INI-- -magic_quotes_runtime=0 --SKIPIF-- --INI-- -magic_quotes_runtime=0 error_reporting=2047 --FILE-- ---EXPECT-- -Deprecated: Directive 'magic_quotes_sybase' is deprecated in PHP 5.3 and greater in Unknown on line 0 -SOME '$SAMPLE' TEXT diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt index 5b85d0dcf2..b943546963 100644 --- a/ext/phar/tests/fgc_edgecases.phpt +++ b/ext/phar/tests/fgc_edgecases.phpt @@ -33,7 +33,6 @@ echo file_get_contents("foob", true); echo file_get_contents("./hi", 0, $context); echo file_get_contents("../oops"); echo file_get_contents("./hi", 0, $context, 50000); -ini_set("magic_quotes_runtime", 1); echo file_get_contents("./hi"); echo file_get_contents("./hi", 0, $context, 0, 0); ?> @@ -60,7 +59,6 @@ echo file_get_contents("foob", true); echo file_get_contents("./hi", 0, $context); echo file_get_contents("../oops"); echo file_get_contents("./hi", 0, $context, 50000); -ini_set("magic_quotes_runtime", 1); echo file_get_contents("./hi"); echo file_get_contents("./hi", 0, $context, 0, 0); ?> @@ -78,7 +76,6 @@ echo file_get_contents("foob", true); echo file_get_contents("./hi", 0, $context); echo file_get_contents("../oops"); echo file_get_contents("./hi", 0, $context, 50000); -ini_set("magic_quotes_runtime", 1); echo file_get_contents("./hi"); echo file_get_contents("./hi", 0, $context, 0, 0); ?> @@ -87,17 +84,16 @@ Warning: file_get_contents(phar://%sfgc_edgecases.phar.php/oops): failed to open Warning: file_get_contents(): Failed to seek to position 50000 in the stream in phar://%sfgc_edgecases.phar.php/foo/hi on line %d ===DONE=== diff --git a/ext/spl/tests/SplFileObject_fwrite_variation_003.phpt b/ext/spl/tests/SplFileObject_fwrite_variation_003.phpt index 429d2a66bc..e69de29bb2 100644 --- a/ext/spl/tests/SplFileObject_fwrite_variation_003.phpt +++ b/ext/spl/tests/SplFileObject_fwrite_variation_003.phpt @@ -1,22 +0,0 @@ ---TEST-- -SplFileObject::fwrite function - writing with magic_quotes_runtime ini set ---FILE-- -fwrite('"test" \'write\''); -var_dump(file_get_contents($file)); -?> ---CLEAN-- - ---EXPECT-- -string(18) "\"test\" \'write\'" diff --git a/ext/standard/tests/file/magic_quotes.phpt b/ext/standard/tests/file/magic_quotes.phpt index 0f42cd7c87..e69de29bb2 100644 --- a/ext/standard/tests/file/magic_quotes.phpt +++ b/ext/standard/tests/file/magic_quotes.phpt @@ -1,77 +0,0 @@ ---TEST-- -various magic quotes tests ---INI-- -error_reporting=14335 ---FILE-- - ---EXPECTF-- -int(0) -int(0) - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -int(1) - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -int(1) -string(30) "some\'content\'here\"and}there" - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -int(0) -string(27) "some'content'here"and}there" - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -int(1) -string(30) "some\'content\'here\"and}there" - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d - -Warning: set_magic_quotes_runtime() expects exactly 1 parameter, 0 given in %s on line %d -NULL -int(0) -string(27) "some'content'here"and}there" -Done diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt index 7db0d1cc78..c7a72de944 100644 --- a/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt +++ b/ext/standard/tests/general_functions/get_cfg_var_variation8.phpt @@ -1,20 +1,17 @@ ---TEST-- -Test function get_cfg_var() by calling deprecated option ---CREDITS-- -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---INI-- -magic_quotes_gpc=1 ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in %s on line 0 -*** Test by calling method or function with deprecated option *** -string(1) "1" - +--TEST-- +Test function get_cfg_var() by calling deprecated option +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--INI-- +magic_quotes_gpc=1 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Directive 'magic_quotes_gpc' is no longer available in PHP in Unknown on line 0 diff --git a/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt b/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt index cfa4dcc681..b1c694a720 100644 --- a/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt +++ b/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt @@ -1,27 +1,13 @@ --TEST-- Test get_magic_quotes_gpc() function ---INI-- -magic_quotes_gpc = 0 --FILE-- ===DONE=== ---EXPECT-- +--EXPECTF-- Simple testcase for get_magic_quotes_gpc() function --- magic quotes gpc set in INI file: 0 -- - --- Set magic quotes gpc to 1 - not allowed so should fail! -- +Deprecated: Function get_magic_quotes_gpc() is deprecated in %s on line %d bool(false) --- magic quotes gpc after set: 0 -- - --- Set magic quotes gpc to 0: -- -bool(false) +-- Error cases -- --- magic quotes gpc after set: 0 -- +Deprecated: Function get_magic_quotes_gpc() is deprecated in %s on line %d --- Error cases -- -int(0) -===DONE=== \ No newline at end of file +Warning: get_magic_quotes_gpc() expects exactly 0 parameters, 1 given in %s on line %d +NULL +===DONE=== diff --git a/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt b/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt index fca064d840..abcef3577c 100644 --- a/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt +++ b/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt @@ -1,32 +1,14 @@ --TEST-- Test get_magic_quotes_runtime() function ---INI-- -magic_quotes_runtime = 0 --FILE-- -===DONE=== ---EXPECTF-- -Simple testcase for set_magic_quotes_runtime() function -magic quotes runtime set in INI file: 0 --- Iterator 1 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 2 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 3 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 4 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 5 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 6 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 7 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 8 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 9 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 10 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 11 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 12 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 13 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 14 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 15 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 1 --- Iterator 16 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 17 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 18 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 19 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d - -Warning: set_magic_quotes_runtime() expects parameter 1 to be boolean, object given in %s on line %d -NULL -New value of magic_quotes_runtime after last set is 0 --- Iterator 20 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d - -Warning: set_magic_quotes_runtime() expects parameter 1 to be boolean, resource given in %s on line %d -NULL -New value of magic_quotes_runtime after last set is 0 --- Iterator 21 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 --- Iterator 22 -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) -New value of magic_quotes_runtime after last set is 0 -===DONE=== diff --git a/ext/standard/tests/strings/add-and-stripslashes.phpt b/ext/standard/tests/strings/add-and-stripslashes.phpt index a5eab410b9..6f01176d4e 100644 --- a/ext/standard/tests/strings/add-and-stripslashes.phpt +++ b/ext/standard/tests/strings/add-and-stripslashes.phpt @@ -1,5 +1,5 @@ --TEST-- -addslashes() and stripslashes() functions, normal and sybase-style +addslashes() and stripslashes() functions --FILE-- --EXPECT-- Normal: OK -Sybase: OK diff --git a/ext/standard/tests/strings/addslashes_variation3.phpt b/ext/standard/tests/strings/addslashes_variation3.phpt index 8f46ebe9a4..e69de29bb2 100644 --- a/ext/standard/tests/strings/addslashes_variation3.phpt +++ b/ext/standard/tests/strings/addslashes_variation3.phpt @@ -1,196 +0,0 @@ ---TEST-- -Test addslashes() function : usage variations - with magic_quotes_sybase directive ON ---FILE-- -', - "hello\x00world", - - // heredoc strings - $heredoc_string, - $heredoc_null_string - ); - -$count = 1; -// looping to test for all strings in $str_array -foreach( $str_array as $str ) { - echo "\n-- Iteration $count --\n"; - var_dump( addslashes($str) ); - $count ++; -} - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing addslashes() : with php directive magic_quotes_sybase set ON *** - --- Iteration 1 -- -string(11) "Hello world" - --- Iteration 2 -- -string(18) "how''re you doing?" - --- Iteration 3 -- -string(30) "don''t disturb u''r neighbours" - --- Iteration 4 -- -string(34) "don''t disturb u''r neighbours''''" - --- Iteration 5 -- -string(0) "" - --- Iteration 6 -- -string(2) "''" - --- Iteration 7 -- -string(2) "''" - --- Iteration 8 -- -string(30) "he said, "he will be on leave"" - --- Iteration 9 -- -string(31) "he said, ""he will be on leave"" - --- Iteration 10 -- -string(9) """"PHP"""" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) """ - --- Iteration 13 -- -string(1) """ - --- Iteration 14 -- -string(6) "hello"" - --- Iteration 15 -- -string(25) "Is your name Ram\Krishna?" - --- Iteration 16 -- -string(8) "\0.0.0.0" - --- Iteration 17 -- -string(26) "c:\php\testcase\addslashes" - --- Iteration 18 -- -string(1) "\" - --- Iteration 19 -- -string(12) "hello\0world" - --- Iteration 20 -- -string(9) "\0hello\0" - --- Iteration 21 -- -string(9) "\0\0hello" - --- Iteration 22 -- -string(2) "\0" - --- Iteration 23 -- -string(12) "''\0.0.0.0''" - --- Iteration 24 -- -string(14) "''\0.0.0.0''\0" - --- Iteration 25 -- -string(13) "\0''c:\php\''" - --- Iteration 26 -- -string(10) ""\0.0.0.0"" - --- Iteration 27 -- -string(13) ""c:\php\"\0''" - --- Iteration 28 -- -string(20) ""hello"''world''\0//" - --- Iteration 29 -- -string(18) "0xABCDEF0123456789" - --- Iteration 30 -- -string(15) "«cdef0123456789" - --- Iteration 31 -- -string(18) "!@#$%&*@$%#&/;:,<>" - --- Iteration 32 -- -string(12) "hello\0world" - --- Iteration 33 -- -string(71) "This is line 1 of ''heredoc'' string -This is line 2 of "heredoc" string" - --- Iteration 34 -- -string(0) "" -Done diff --git a/ext/standard/tests/strings/bug22904.phpt b/ext/standard/tests/strings/bug22904.phpt index 3c56e1a414..e69de29bb2 100644 --- a/ext/standard/tests/strings/bug22904.phpt +++ b/ext/standard/tests/strings/bug22904.phpt @@ -1,30 +0,0 @@ ---TEST-- -Bug #22904 (magic mode failed for cybase with '\0') ---FILE-- -not active yet - ---EXPECT-- -not active yet diff --git a/ext/standard/tests/strings/parse_str_basic3.phpt b/ext/standard/tests/strings/parse_str_basic3.phpt index 06e614374e..f0f5981e8f 100644 Binary files a/ext/standard/tests/strings/parse_str_basic3.phpt and b/ext/standard/tests/strings/parse_str_basic3.phpt differ diff --git a/ext/standard/tests/strings/stripslashes_variation5.phpt b/ext/standard/tests/strings/stripslashes_variation5.phpt index 0507e04960..e69de29bb2 100644 Binary files a/ext/standard/tests/strings/stripslashes_variation5.phpt and b/ext/standard/tests/strings/stripslashes_variation5.phpt differ diff --git a/ext/sysvsem/tests/sysv.phpt b/ext/sysvsem/tests/sysv.phpt index 4245d8ef0c..3a962be31a 100644 --- a/ext/sysvsem/tests/sysv.phpt +++ b/ext/sysvsem/tests/sysv.phpt @@ -6,8 +6,6 @@ if(!extension_loaded('sysvsem') || !extension_loaded('sysvshm')) { die("skip Both sysvsem and sysvshm required"); } ?> ---INI-- -magic_quotes_runtime=0 --FILE-- ---INI-- -magic_quotes_runtime=0 --FILE-- ---INI-- -magic_quotes_runtime=0 --FILE-- ---INI-- -magic_quotes_runtime=0 --FILE-- ---INI-- -magic_quotes_runtime=0 --FILE-- ---INI-- -magic_quotes_runtime=0 --FILE-- --EXPECTF-- @@ -66,24 +63,4 @@ array(6) { string(39) "and I know that it descends down on me " } -array(6) { - [0]=> - string(37) "When you\'re taught through feelings -" - [1]=> - string(26) "Destiny flying high above -" - [2]=> - string(38) "all I know is that you can realize it -" - [3]=> - string(18) "Destiny who cares -" - [4]=> - string(19) "as it turns around -" - [5]=> - string(39) "and I know that it descends down on me -" -} Done diff --git a/main/php_version.h b/main/php_version.h index 7ae029251b..b09b8a4b5c 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 4 #define PHP_RELEASE_VERSION 0 -#define PHP_EXTRA_VERSION "alpha3" +#define PHP_EXTRA_VERSION "alpha3-dev" #define PHP_VERSION "5.4.0alpha3-dev" #define PHP_VERSION_ID 50400 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 @@ -1,3 +1,68 @@ +--TEST-- +Bug #46313 (Magic quotes broke $_FILES) +--SKIPIF-- + +--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-- + +--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-- 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-- - ---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-- - ---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-- - $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-- - ---EXPECT-- -abc\'\"\0123