1--TEST-- 2Bug #70019 Files extracted from archive may be placed outside of destination directory 3--SKIPIF-- 4<?php if (!extension_loaded("phar") || !extension_loaded('zlib')) die("skip"); ?> 5--FILE-- 6<?php 7$dir = __DIR__."/bug70019"; 8$phar = new PharData(__DIR__."/bug70019.zip"); 9if(!is_dir($dir)) { 10 mkdir($dir); 11} 12$phar->extractTo($dir); 13var_dump(file_exists("$dir/ThisIsATestFile.txt")); 14?> 15===DONE=== 16--CLEAN-- 17<?php 18$dir = __DIR__."/bug70019"; 19unlink("$dir/ThisIsATestFile.txt"); 20rmdir($dir); 21?> 22--EXPECT-- 23bool(true) 24===DONE=== 25