php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /var/www/html/img_galeri/2r1asasas/root/php-7.1.11/ext/phar/tests/bug64931/ |
| files >> //var/www/html/img_galeri/2r1asasas/root/php-7.1.11/ext/phar/tests/bug64931/bug64931.phpt |
--TEST--
Bug #64931 (phar_add_file is too restrictive on filename)
--SKIPIF--
<?php extension_loaded("phar") or die("skip need ext/phar support"); ?>
--INI--
phar.readonly=0
--FILE--
<?php
echo "Test\n";
@unlink(__DIR__."/bug64931.phar");
$phar = new Phar(__DIR__."/bug64931.phar");
$phar->addFile(__DIR__."/src/.pharignore", ".pharignore");
try {
$phar->addFile(__DIR__."/src/.pharignore", ".phar/gotcha");
} catch (Exception $e) {
echo "CAUGHT: ". $e->getMessage() ."\n";
}
try {
$phar->addFromString(".phar", "gotcha");
} catch (Exception $e) {
echo "CAUGHT: ". $e->getMessage() ."\n";
}
try {
$phar->addFromString(".phar//", "gotcha");
} catch (Exception $e) {
echo "CAUGHT: ". $e->getMessage() ."\n";
}
try {
$phar->addFromString(".phar\\", "gotcha");
} catch (Exception $e) {
echo "CAUGHT: ". $e->getMessage() ."\n";
}
try {
$phar->addFromString(".phar\0", "gotcha");
} catch (Exception $e) {
echo "CAUGHT: ". $e->getMessage() ."\n";
}
?>
===DONE===
--CLEAN--
<?php
@unlink(__DIR__."/bug64931.phar");
?>
--EXPECTF--
Test
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
Warning: Phar::addFromString() expects parameter 1 to be a valid path, string given in %s%ebug64931.php on line %d
===DONE===
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`