Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in sanitizeFileNameAndPath #28

Open
klodeckl opened this issue Oct 26, 2017 · 0 comments
Open

Bug in sanitizeFileNameAndPath #28

klodeckl opened this issue Oct 26, 2017 · 0 comments

Comments

@klodeckl
Copy link

count($pathSegments) === 2 does never be true because there is only one element in the array, I fixed with the following (Classes/Service/UploadFileService.php, line 91):

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]; }

tomita-militaru added a commit to tomita-militaru/media_upload that referenced this issue Mar 1, 2018
fabarea pushed a commit that referenced this issue Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant