diff options
-rw-r--r-- | ext/gd/tests/imagegd2_nullbyte_injection.phpt | 10 | ||||
-rw-r--r-- | ext/gd/tests/imagegd_nullbyte_injection.phpt | 9 | ||||
-rw-r--r-- | ext/gd/tests/imagexbm_nullbyte_injection.phpt | 11 |
3 files changed, 18 insertions, 12 deletions
diff --git a/ext/gd/tests/imagegd2_nullbyte_injection.phpt b/ext/gd/tests/imagegd2_nullbyte_injection.phpt index 856acaefee..30394cc1a5 100644 --- a/ext/gd/tests/imagegd2_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd2_nullbyte_injection.phpt @@ -7,9 +7,11 @@ Testing null byte injection in imagegd2 --FILE-- <?php $image = imagecreate(1,1);// 1px image -var_dump(imagegd2($image, "./foo\0bar")); -?> +try { + imagegd($image, "./foo\0bar"); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> --EXPECT-- -Warning: imagegd2() expects parameter 2 to be a valid path, string given in %s on line %d -NULL +imagegd() expects parameter 2 to be a valid path, string given diff --git a/ext/gd/tests/imagegd_nullbyte_injection.phpt b/ext/gd/tests/imagegd_nullbyte_injection.phpt index 6bcc0ee2bc..f53d9b5dac 100644 --- a/ext/gd/tests/imagegd_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd_nullbyte_injection.phpt @@ -7,8 +7,11 @@ Testing null byte injection in imagegd --FILE-- <?php $image = imagecreate(1,1);// 1px image -var_dump(imagegd($image, "./foo\0bar")); +try { + imagegd($image, "./foo\0bar"); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> --EXPECT-- -Warning: imagegd() expects parameter 2 to be a valid path, string given in %s on line %d -NULL +imagegd() expects parameter 2 to be a valid path, string given diff --git a/ext/gd/tests/imagexbm_nullbyte_injection.phpt b/ext/gd/tests/imagexbm_nullbyte_injection.phpt index b485315064..a24aa3c007 100644 --- a/ext/gd/tests/imagexbm_nullbyte_injection.phpt +++ b/ext/gd/tests/imagexbm_nullbyte_injection.phpt @@ -7,10 +7,11 @@ if(!extension_loaded('gd')) die('skip gd extension not available'); --FILE-- <?php $image = imagecreate(1,1);// 1px image -var_dump(imagexbm($image, "./foo\0bar")); +try { + imagexbm($image, "./foo\0bar"); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> -===DONE=== --EXPECTF-- -Warning: imagexbm() expects parameter 2 to be a valid path, string given in %s on line %d -NULL -===DONE=== +imagexbm() expects parameter 2 to be a valid path, string given |