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

filepicker_image_url doesn't include the handle in the policy #116

Closed
sguha00 opened this issue Jan 29, 2015 · 6 comments
Closed

filepicker_image_url doesn't include the handle in the policy #116

sguha00 opened this issue Jan 29, 2015 · 6 comments
Labels

Comments

@sguha00
Copy link

sguha00 commented Jan 29, 2015

When adding the policy and signature to the image_url, the policy only includes the call and expiry keys and no handle key which is specified here: https://developers.filepicker.io/docs/security/#createPolicy

It seems like the handle key is required to read a secure file

@maurogeorge
Copy link
Contributor

@sguha00 you got any problem? Do you know how to solve it?

This Policy is a thing that I don't know too much, but as you can see here #93 I think today this is stable. You can reproduce a error, try to give some examples.

Today the helpers generate url like this.

Thanks for your feedback

@maurogeorge
Copy link
Contributor

Closing, since no got any feedback here.

@danmichaelson
Copy link

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.

@maurogeorge maurogeorge reopened this Jan 5, 2016
@maurogeorge maurogeorge added the bug label Jan 5, 2016
@maurogeorge
Copy link
Contributor

@danmichaelson I reopen the issue, thanks for the info.

@danmichaelson
Copy link

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.

@dirkkelly
Copy link
Contributor

@danmichaelson @maurogeorge I've opened a Pull Request that adds the handle to secure url generation.

@kyuss kyuss closed this as completed in #154 Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants