-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Security for file uploads #2137
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
Comments
This is the expected behavior. Historically, on parse.com, the files upload is open to all clients. I believe the behavior you're trying to achieve can be implemented through a hook, like On another note, I'm not sure the client SDK's send authentication information (like the You may wanna look into that too. Feel free to open a pull request to add that feature. |
Closing as this is the normal behavior and is canon to how the original parse.com api functioned. |
Will |
@kinosang this is not in the plans, however, if you wish to write a PR for it, we'll gladly review it. |
Any progress on this? BeforeSave for Parse File would be really useful |
@kinosang @uzaysan you can have a look here https://docs.parseplatform.org/cloudcode/guide/#beforesavefile. For the usage you can have a look at the test cases. |
Issue Description
We've managed to set-up an S3 bucket without any issues and file uploads work great.
My main concern is that anyone can upload files to my bucket without any security .
I've searched all around and even looked through the adapter and haven't seen anywhere a security check .
Testing this it turn out that anyone can make file uploads to my bucket as long as they know my appID
Steps to reproduce
Setup an S3 bucket .
Make a POST request to upload a file.
For example :
curl -X POST -H "X-Parse-Application-Id: <APP_ID>" -H "Content-Type: text/plain" -T "D:\test.txt" http://localhost/parse/files/test.txt
Expected Results
An unauthorized error as long as no session token( or any other authentication method ) was provided in the header.
Actual Outcome
Environment Setup
The text was updated successfully, but these errors were encountered: