Benign php 10,813,468 installs Download

league/flysystem-ziparchive 3.29.0

“ZIP filesystem adapter for Flysystem.”

Calls PHP unlink()PHP reads remaining stream contents

Evidence

PHP creates a ZIP archive FilesystemZipArchiveProvider.php · lines 1–48
⋯4 lines
5namespace League\Flysystem\ZipArchive;
6
7use ZipArchive;
8
9class FilesystemZipArchiveProvider implements ZipArchiveProvider
⋯10 lines
20 public function createZipArchive(): ZipArchive
21 {
22 if ($this->parentDirectoryCreated !== true) {
23 $this->parentDirectoryCreated = true;
24 $this->createParentDirectoryForZipArchive($this->filename);
⋯5 lines
30 private function createParentDirectoryForZipArchive(string $fullPath): void
31 {
32 $dirname = dirname($fullPath);
33
34 if (is_dir($dirname) || @mkdir($dirname, $this->localDirectoryPermissions, true)) {
35 return;
36 }
37
38 if ( ! is_dir($dirname)) {
39 throw UnableToCreateParentDirectory::atLocation($fullPath, error_get_last()['message'] ?? '');
40 }
41 }
42
43 private function openZipArchive(): ZipArchive
44 {
45 $archive = new ZipArchive();
46 $success = $archive->open($this->filename, ZipArchive::CREATE);
47
48 if ($success !== true) {
PHP ZipArchive adds in-memory member StubZipArchive.php · lines 47–56
47:20… $flags
48 *
49 * @return bool
50 */
51 public function addFromString($localname, $contents, $flags = 0): bool
52 {
53 if ($this->failNextWrite) {
54 $this->failNextWrite = false;
55
56 …
PHP reads remaining stream contents ZipArchiveAdapter.php · lines 89–94
89:42… ath, $contents, Config $config): void
90 {
91 $contents = stream_get_contents($contents);
92
93 if ($contents === false) {
94 throw UnableToWriteFile::atLocation($path, 'Could not get contents …
PHP function name contains a read word ZipArchiveAdapter.php · lines 97–103
97:4… $this->write($path, $contents, $config);
98 }
99
100 public function read(string $path): string
101 {
102 $archive = $this->zipArchiveProvider->createZipArchive();
103 $contents = $archive->getF …
PHP opens a file or URL stream ZipArchiveAdapter.php · lines 122–130
122:32… ile::fromLocation($path, $status);
123 }
124
125 $stream = fopen('php://temp', 'w+b');
126 stream_copy_to_stream($resource, $stream);
127 rewind($stream);
128 fclose($resource);
129
130 …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.