Skip to content

Commit

Permalink
strip slashes from filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Devolicious committed Apr 2, 2015
1 parent db016cd commit 30327c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Helper/File/FileHandler.php
Expand Up @@ -212,6 +212,7 @@ public function getOriginalFile(Media $media)
private function getFilePath(Media $media)
{
$filename = $media->getOriginalFilename();
$filename = str_replace(array('/', '\\'), '', $filename);

if (!empty($this->blacklistedExtensions)) {
$filename = preg_replace('/\.('.join('|', $this->blacklistedExtensions).')$/', '.txt', $filename);
Expand Down

0 comments on commit 30327c2

Please sign in to comment.