Kernel : Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
Disable function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Safe mode : OFF
Host : diestoffstrasse.com | Server ip : 127.0.0.1 | Your ip : 127.0.0.1 | Time @ Server : 24 Aug 2025 11:07:18
MySQL : OFF | MSSQL : OFF | cURL : ON | Oracle : OFF | wget : ON | Perl : ON

/home/dev2.destoffenstraat.com/vendor-1/magento/framework/Test/Unit/

HOME about upload exec mass file domain root vuln newfile newfolder kill me

File Path : /home/dev2.destoffenstraat.com/vendor-1/magento/framework/Test/Unit/ArchiveTest.php

<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\Test\Unit; use Magento\Framework\Archive; use PHPUnit\Framework\TestCase; class ArchiveTest extends TestCase { /** * @var Archive */ protected $archive; /** * @var string */ protected $sourceFilePath; /** * @var string */ protected $destinationDir; /** * @var string */ protected $packed; /** * @var string */ protected $unpacked; protected function setUp(): void { $this->archive = new Archive(); $this->sourceFilePath = __DIR__ . '/_files/source.txt'; $this->destinationDir = __DIR__ . '/_files/archives/'; } protected function tearDown(): void { if (!empty($this->packed) && file_exists($this->packed)) { unlink($this->packed); $this->packed = null; } if (!empty($this->unpacked) && file_exists($this->unpacked)) { unlink($this->unpacked); $this->unpacked = null; } } /** * @dataProvider isArchiveProvider * @param string $file * @param bool $isArchive */ public function testIsArchive($file, $isArchive) { $this->assertEquals($isArchive, $this->archive->isArchive($file)); } /** * @return array */ public function isArchiveProvider() { return [ ['archive.tar', true], ['archive.gz', true], ['archive.gzip', true], ['archive.tgz', true], ['archive.tgzip', true], ['archive.bz', true], ['archive.bzip', true], ['archive.bzip2', true], ['archive.bz2', true], ['archive.tbz', true], ['archive.tbzip', true], ['archive.tbz2', true], ['archive.tbzip2', true], ['archive.txt', false], ['archive.php', false], ['archive.phtml', false], ['archive.js', false], ['archive.log', false], ]; } /** * @dataProvider isTarProvider * @param string $file * @param bool $isArchive */ public function testIsTar($file, $isArchive) { $this->assertEquals($isArchive, $this->archive->isTar($file)); } /** * @return array */ public function isTarProvider() { return [ ['archive.tar', true], ['archive.gz', false], ['archive.gzip', false], ['archive.tgz', false], ['archive.tgzip', false], ['archive.bz', false], ['archive.bzip', false], ['archive.bzip2', false], ['archive.bz2', false], ['archive.tbz', false], ['archive.tbzip', false], ['archive.tbz2', false], ['archive.tbzip2', false], ['archive.txt', false], ['archive.php', false], ['archive.phtml', false], ['archive.js', false], ['archive.log', false], ]; } /** * @param string $destinationFile * @param string $extensionRequired * @dataProvider destinationProvider */ public function testPackUnpackGzBz($destinationFile, $extensionRequired) { if ($extensionRequired && !extension_loaded($extensionRequired)) { $this->markTestSkipped("The extension '{$extensionRequired}' is not enabled."); } $this->packed = $this->archive->pack($this->sourceFilePath, $this->destinationDir . $destinationFile); $this->assertFileExists($this->packed); $this->assertEquals($this->destinationDir . $destinationFile, $this->packed); $this->unpacked = $this->archive->unpack($this->packed, $this->destinationDir); $this->assertFileExists($this->unpacked); $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } /** * @return array */ public function destinationProvider() { return [ ['archive.gz', 'zlib'], ['archive.gzip', 'zlib'], ['archive.bz', 'bz2'], ['archive.bzip', 'bz2'], ['archive.bzip2', 'bz2'], ['archive.bz2', 'bz2'] ]; } /** * @param string $destinationFile * @param string $extensionRequired * @dataProvider tarProvider */ public function testPackUnpackTar($destinationFile, $extensionRequired) { if ($extensionRequired && !extension_loaded($extensionRequired)) { $this->markTestSkipped("The extension '{$extensionRequired}' is not enabled."); } $this->packed = $this->archive->pack($this->sourceFilePath, $this->destinationDir . $destinationFile); $this->assertFileExists($this->packed); $this->assertEquals($this->destinationDir . $destinationFile, $this->packed); $unpacked = $this->archive->unpack($this->packed, $this->destinationDir); $this->unpacked = $unpacked . pathinfo($this->sourceFilePath, PATHINFO_BASENAME); $this->assertFileExists($this->unpacked); $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } /** * @param string $destinationFile * @param string $extensionRequired * @dataProvider tarProvider */ public function testExtract($destinationFile, $extensionRequired) { if ($extensionRequired && !extension_loaded($extensionRequired)) { $this->markTestSkipped("The extension '{$extensionRequired}' is not enabled."); } $this->packed = $this->archive->pack($this->sourceFilePath, $this->destinationDir . $destinationFile); $this->assertFileExists($this->packed); $this->assertEquals($this->destinationDir . $destinationFile, $this->packed); $filename = pathinfo($this->sourceFilePath, PATHINFO_BASENAME); $this->unpacked = $this->archive->extract($filename, $this->packed, $this->destinationDir); $this->assertFileExists($this->unpacked); $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } /** * @return array */ public function tarProvider() { return [ ['archive.tar', ''], ['archive.tgz', 'zlib'], ['archive.tgzip', 'zlib'], ['archive.tbz', 'bz2'], ['archive.tbzip', 'bz2'], ['archive.tbz2', 'bz2'], ['archive.tbzip2', 'bz2'] ]; } }