-
Notifications
You must be signed in to change notification settings - Fork 101
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
filepicker_image_url doesn't include the handle in the policy #116
Comments
Closing, since no got any feedback here. |
Can this be re-opened? Looking at the code, we are generating a policy that doesn't specify a file handle. It's valid, but it allows converting any image using the same policy. So if your expiry is 100 years, you aren't adding any security at all as far as I know (because the policy can be grabbed from the URL and reused to convert anything else, forever). This is maybe not a huge deal now, but it will become important once compatibility is added for converting external URLs (as is supported by the new process.filepicker.io syntax) since then the policy can be hijacked to convert an entirely different set of URLs. |
@danmichaelson I reopen the issue, thanks for the info. |
I emailed Filepicker support about this, they did point out that the current code adds a little bit of security since you at least can't hijack this policy to upload files. Regardless, specifying the handle is important, especially because I don't think a 10-minute expiry is compatible with CDN's. |
@danmichaelson @maurogeorge I've opened a Pull Request that adds the handle to secure url generation. |
When adding the
policy
andsignature
to the image_url, the policy only includes thecall
andexpiry
keys and nohandle
key which is specified here: https://developers.filepicker.io/docs/security/#createPolicyIt seems like the
handle
key is required to read a secure fileThe text was updated successfully, but these errors were encountered: