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

Empty strings in NO_PROXY sometimes treated as wildcard #308

Closed
hpelwintervold opened this issue Aug 26, 2024 · 1 comment
Closed

Empty strings in NO_PROXY sometimes treated as wildcard #308

hpelwintervold opened this issue Aug 26, 2024 · 1 comment

Comments

@hpelwintervold
Copy link
Contributor

Is this a support request?
No

Describe the bug
A clear and concise description of what the bug is.
NO_PROXY support added in #301 will treat empty strings as wildcards in some cases. The logic should only treat * as a wildcard, never empty string.

To reproduce
Set NO_PROXY to one of the below strings:
'secure.example.com:443,' (matches all addresses due to trailing ,)
:8080 (matches all hosts due to leading :)

Expected behavior
NO_PROXY parsing should be more defensive against empty strings encountered.
'secure.example.com:443,' should treat trailing ,as never matching anything, or an error:8080` should never match anything, or be an error

Logs
N/A

SDK version
9.6.0

Language version, developer tools
Python 3.12.2

OS/platform
Ubuntu

Additional context
Comparison of HTTP_PROXY/NO_PROXY implementations: https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/

@keelerm84
Copy link
Member

Fixed in v9.7.1

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

3 participants
@keelerm84 @hpelwintervold and others