]> granicus.if.org Git - php/commitdiff
forked bug41655 test for windows
authorAnatol Belski <ab@php.net>
Sat, 20 Sep 2014 13:13:42 +0000 (15:13 +0200)
committerAnatol Belski <ab@php.net>
Sat, 20 Sep 2014 13:14:31 +0000 (15:14 +0200)
ext/standard/tests/file/bug41655_1-win32.phpt [new file with mode: 0644]
ext/standard/tests/file/bug41655_1.phpt

diff --git a/ext/standard/tests/file/bug41655_1-win32.phpt b/ext/standard/tests/file/bug41655_1-win32.phpt
new file mode 100644 (file)
index 0000000..631d910
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Bug #41655 (open_basedir bypass via glob()) 1/2
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+    die('skip only for Windows');
+}
+?>
+--CREDITS--
+Dave Kelsey <d_kelsey@uk.ibm.com>
+--INI--
+open_basedir=/tmp
+--FILE--
+<?php
+$a=glob("./*.jpeg");
+var_dump($a);
+echo "Done\n";
+?>
+--EXPECT--
+array(0) {
+}
+Done
index 62d64dfb1e10a968bc8cf1fbbc68d0610bb8d9ae..e4466821f906262289d09dfc175c97a1c5beb8eb 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 Bug #41655 (open_basedir bypass via glob()) 1/2
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+    die('skip not for Windows');
+}
+?>
 --CREDITS--
 Dave Kelsey <d_kelsey@uk.ibm.com>
 --INI--
@@ -12,4 +18,4 @@ echo "Done\n";
 ?>
 --EXPECT--
 bool(false)
-Done
\ No newline at end of file
+Done