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

s3direct should validate the path of the uploading file matches the server-generated key on server side #254

Open
taylorhughes opened this issue Jul 18, 2022 · 0 comments

Comments

@taylorhughes
Copy link

It is possible with s3direct to sign arbitrary s3 operations against the bucket exposed via s3direct/evaporate, because get_aws_v4_signature just signs whatever hash you give it without validating the target key. So s3direct essentially makes any file in the bucket writeable. (This library should come with a giant red warning if regular end-users can upload publicly accessible content via s3direct)

This should pass canonicalRequest to the django view so the django view can validate the to_sign contains an acceptable URL path:
https://github.com/bradleyg/django-s3direct/blob/master/src/index.js#L120

Discussion in evaporate issues from 2016 where they added canonicalRequest support for this purpose:
TTLabs/EvaporateJS#219 (comment)

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