-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add client option to disable redirects #21024
Conversation
|
@dianatatar what happens when presto://localhost:8080/blackhole?followRedirects=ANINVALIDOPTION is given here? it could be a typo as well like presto://localhost:8080/blackhole?followRedirects=false1. What's the behaviour? |
Connection properties take in several checks when initiated, one of which is a converter which checks if the URI parameter value is as expected. followRedirects uses a boolean converter which checks that the value is either true or false and throws otherwise. I added an extra assert in TestPrestoDriverUri to confirm this behavior. |
Codenotify: Notifying subscribers in CODENOTIFY files for diff b5a403b...45727d6.
|
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.
LGTM! (docs)
Hi. |
@skairali any further comments? |
@tdcmeehan @skairali any updates or some sort of rough ETA? |
1 similar comment
@tdcmeehan @skairali any updates or some sort of rough ETA? |
@dianatatar (1) Could you please let me know what's the default value of the parameter? I would recommend the configuration to work AS IS and only take affect if its explicitly provided (2)Please also resolve conflicts and rebase @tdcmeehan @tcherel I am approving this PR conditionally that @dianatatar takes care of (1) and (2) |
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.
Marking my approval as commented above
Thanks @skairali |
Presto clients can attempt to follow a redirect from an untrusted server, adding option to disable redirect as a security improvement.
Presto clients can attempt to follow a redirect from an untrusted server, adding option to disable redirect as a security improvement.
Description
Add client option to disable redirects
Motivation and Context
Presto clients can attempt to follow a redirect from an untrusted server, adding option to disable redirect as a security improvement
Fixes advisory GHSA-xm7x-f3w2-4hjm
Impact
Adding option to disable Presto clients following a redirect. This is an opt in, by default the current client behavior does not change
Test Plan
Tested locally with CLI and Presto Jdbc client by sending a server redirect (307/308 http code) and confirming clients will not follow the redirect if option to follow redirects is disabled
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.