Commit:    86d2fafded73511e762671a60d6935ac87d6e39d
Author:    Matt Ficken <mattfic...@php.net>         Fri, 25 May 2012 10:44:59 
+0200
Committer: Anatoliy Belsky <a...@php.net>      Fri, 25 May 2012 10:44:59 +0200
Parents:   4aac4da6739a87bf481fdd653b420dc5ca56b3ed
Branches:  PHP-5.3 PHP-5.4 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=86d2fafded73511e762671a60d6935ac87d6e39d

Log:
Fixed bug #62149 Test Bug - ext/curl/tests/bug61948

Bugs:
https://bugs.php.net/62149
https://bugs.php.net/61948

Changed paths:
  A  ext/curl/tests/bug61948-win32.phpt
  M  ext/curl/tests/bug61948.phpt


Diff:
diff --git a/ext/curl/tests/bug61948-win32.phpt 
b/ext/curl/tests/bug61948-win32.phpt
new file mode 100644
index 0000000..dc86526
--- /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 a03fc3b..23bbda7 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--


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to