-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Restrict proxy URLs #4406
Restrict proxy URLs #4406
Conversation
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-4406-all-demos |
Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Aarni Koskela <akx@iki.fi>
… into further-restrict-proxy
Suggestions should be addressed now @akx, please feel free to re-review! |
Tests have been updated -- @freddyaboulton @dawoodkhan82 or @aliabid94 would you be able to give this a review so that we can merge in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm interesting, let me see what's happening there |
Ok let me merge this in and then I'll look at the file path issue in a separate PR. Thanks again for the reviews @akx and @freddyaboulton! |
Restricts proxy URLs to those that a user has loaded through
gr.load()
.Solves two issues:
(1) Prevents users from carrying out SSRF (using other people's Spaces to make requests through the /proxy route)
(2) Prevents harvesting of a Space's HF tokens
cc @akx