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

The XSS is possible without Laravel varidation? #159

Closed
fumiyasac opened this issue May 30, 2016 · 2 comments
Closed

The XSS is possible without Laravel varidation? #159

fumiyasac opened this issue May 30, 2016 · 2 comments

Comments

@fumiyasac
Copy link

When I use Laravel-Stapler without Validation, malicious file can upload public directory or storage.
An error(Symfony Componet Exception) is displayed with the screen, but I check my storage, malicious file is exist.
It is thought that the cause of this problem happens by not confirming file mime type.
Because a similar problem happened in the version of the former "paperclip", I added a postscript to the link which seemed to serve as a reference.

Just FYI:
・Paperclip Security Release
https://robots.thoughtbot.com/paperclip-security-release
・Fix a possible security issue with spoofing
thoughtbot/paperclip@9aee411

@tabennett
Copy link
Contributor

I don't think this is an issue with this plugin; it's realy be an issue with the end-user's application application that they use this plugin in. Paperclip also/provides handles/provides mime type validation, Stapler doesn't. The only thing this plugin verifies is that the uploaded file isn't spoofed, and that validation is done via the Symfony Uploaded File Object. Aside from that, it's entirely the responsibility of the end user to verify the mime types of their files as needed by the constraints of their specific application.

@fumiyasac
Copy link
Author

Thank you for an answer. An answer is late, and I am sorry.

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

2 participants