Skip to content

Commit

Permalink
[Asset] do not allow PHAR upload
Browse files Browse the repository at this point in the history
  • Loading branch information
brusch committed Mar 19, 2019
1 parent 732f164 commit 6ee5d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/Asset.php
Expand Up @@ -619,7 +619,7 @@ public function correctPath()
}

// do not allow PHP and .htaccess files
if (preg_match("@\.ph(p[\d+]?|t|tml|ps)$@i", $this->getFilename()) || $this->getFilename() == '.htaccess') {
if (preg_match("@\.ph(p[\d+]?|t|tml|ps|ar)$@i", $this->getFilename()) || $this->getFilename() == '.htaccess') {
$this->setFilename($this->getFilename() . '.txt');
}

Expand Down

0 comments on commit 6ee5d85

Please sign in to comment.