Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/ext/phar/tests/ |
Current File : //proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/ext/phar/tests/bug65414.phpt |
--TEST-- Bug #65414 Injection (A1) in .phar files magic .phar directory --SKIPIF-- <?php if (!extension_loaded("phar")) die("skip"); ?> --INI-- phar.readonly = 0 --FILE-- <?php $phar = new \Phar(__DIR__ . '/bug65414.phar', 0, 'bug65414.phar'); $bads = [ '.phar/injected-1.txt', '/.phar/injected-2.txt', '//.phar/injected-3.txt', '/.phar/', ]; foreach ($bads as $bad) { echo $bad . ':'; try { $phar->addFromString($bad, 'this content is injected'); echo 'Failed to throw expected exception'; } catch (BadMethodCallException $ex) { echo $ex->getMessage() . PHP_EOL; } } echo 'done' . PHP_EOL; ?> --CLEAN-- <?php unlink(__DIR__ . '/bug65414.phar'); ?> --EXPECT-- .phar/injected-1.txt:Cannot create any files in magic ".phar" directory /.phar/injected-2.txt:Cannot create any files in magic ".phar" directory //.phar/injected-3.txt:Entry //.phar/injected-3.txt does not exist and cannot be created: phar error: invalid path "//.phar/injected-3.txt" contains double slash /.phar/:Cannot create any files in magic ".phar" directory done
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare