Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit c73736a

Browse files
authored
properly escape path sep in tar file list regex
1 parent 4b63adb commit c73736a

File tree

1 file changed

+1
-1
lines changed
  • snappymail/v/0.0.0/app/libraries/snappymail

1 file changed

+1
-1
lines changed

snappymail/v/0.0.0/app/libraries/snappymail/tar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function extractTo(string $directory, $files = null, bool $overwrite = fa
2929
}
3030

3131
if ($files) {
32-
$files = '/^(' . \implode('|', \array_map('preg_quote', \is_array($files) ? $files : [$files])) . ')/u';
32+
$files = '/^(' . \implode('|', \array_map(fn($x): string => preg_quote($x, '/'), \is_array($files) ? $files : [$files])) . ')/u';
3333
}
3434

3535
\clearstatcache(true);

0 commit comments

Comments
 (0)