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