Skip to content

Commit

Permalink
[BUGFIX] Fix issue fabarea#28
Browse files Browse the repository at this point in the history
  • Loading branch information
tomita-militaru committed Mar 1, 2018
1 parent e5f39b8 commit 5fcfcb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Service/UploadFileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ protected function sanitizeFileNameAndPath($uploadedFileName)
// Also check the path does not contain any back segment like "..".
if (count($pathSegments) === 2 && strpos($uploadedFileName, '..') === false) {
$sanitizedFileNameAndPath = UploadManager::UPLOAD_FOLDER . $pathSegments[1];
} elseif (count($pathSegments) === 1 && strpos($uploadedFileName, '..') === false) {
$sanitizedFileNameAndPath = UploadManager::UPLOAD_FOLDER . $pathSegments[0];
}
return $sanitizedFileNameAndPath;
}
Expand Down

0 comments on commit 5fcfcb7

Please sign in to comment.