We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a5a32 commit 44fd600Copy full SHA for 44fd600
lib/internal/Magento/Framework/Filesystem/File/Write.php
@@ -34,7 +34,9 @@ protected function assertValid()
34
{
35
$fileExists = $this->driver->isExists($this->path);
36
$mode = $this->mode ?? '';
37
- if (!$fileExists && preg_match('/r/', $mode)) {
+ if (preg_match('/(?:^-|\s-)/', $this->path)) {
38
+ throw new FileSystemException(new \Magento\Framework\Phrase('The file "%1" can\' be allowed', [$this->path]));
39
+ } elseif (!$fileExists && preg_match('/r/', $mode)) {
40
throw new FileSystemException(
41
new \Magento\Framework\Phrase('The "%1" file doesn\'t exist.', [$this->path])
42
);
0 commit comments