diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-05-31 10:55:48 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-05-31 10:55:48 +0200 |
| commit | 90ceaa9e92fadfef4c21ec0f76063c4387beb561 (patch) | |
| tree | 42c54fe576b4513fa12eb949ce67bda472411abc /ext/curl | |
| parent | 01c525f668ecff08bea21c4ff22745b8f77e8c3a (diff) | |
| download | php-90ceaa9e92fadfef4c21ec0f76063c4387beb561.tar.gz | |
Imported Upstream version 5.4.4~rc2upstream/5.4.4_rc2
Diffstat (limited to 'ext/curl')
| -rw-r--r-- | ext/curl/tests/bug61948-win32.phpt | 25 | ||||
| -rw-r--r-- | ext/curl/tests/bug61948.phpt | 5 |
2 files changed, 29 insertions, 1 deletions
diff --git a/ext/curl/tests/bug61948-win32.phpt b/ext/curl/tests/bug61948-win32.phpt new file mode 100644 index 000000000..dc86526b7 --- /dev/null +++ b/ext/curl/tests/bug61948-win32.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) +--SKIPIF-- +<?php if (!extension_loaded("curl")) print "skip"; +if(substr(PHP_OS, 0, 3) != 'WIN' ) + die("skip Not Valid for Linux"); +?> +--INI-- +open_basedir="c:/tmp" +--FILE-- +<?php + $ch = curl_init(); + var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "")); + var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/tmp/foo")); + var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar")); + curl_close($ch); +?> +--EXPECTF-- +%a + +Warning: curl_setopt(): open_basedir restriction in effect. File(c:/tmp/foo) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d +bool(false) + +Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d +bool(false) diff --git a/ext/curl/tests/bug61948.phpt b/ext/curl/tests/bug61948.phpt index a03fc3b60..23bbda7d5 100644 --- a/ext/curl/tests/bug61948.phpt +++ b/ext/curl/tests/bug61948.phpt @@ -1,7 +1,10 @@ --TEST-- Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) --SKIPIF-- -<?php if (!extension_loaded("curl")) print "skip"; ?> +<?php if (!extension_loaded("curl")) print "skip"; +if(substr(PHP_OS, 0, 3) == 'WIN' ) + die("skip Not Valid for Windows"); +?> --INI-- open_basedir="/tmp" --FILE-- |
