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

Emit a warning when proxy_is_verified is False #2791

Open
sethmlarson opened this issue Nov 10, 2022 · 1 comment · May be fixed by #3070
Open

Emit a warning when proxy_is_verified is False #2791

sethmlarson opened this issue Nov 10, 2022 · 1 comment · May be fixed by #3070

Comments

@sethmlarson
Copy link
Member

Currently we have InsecureRequestWarning which is emitted when an HTTPSConnection isn't verified (for example, when verification is disabled). Now that we have HTTPConnection.proxy_is_verified we can detect when the proxy.scheme is https but the proxy connection isn't verified.

Perhaps the warning should be something like InsecureProxyWarning?

@tushar5526
Copy link
Contributor

Hey, I was taking a look at this and found that when proxy_scheme is HTTPS and the proxy is not verified, we get an InsecureRequestWarning instead of an InsecureProxyWarning. We can throw a warning when an insecure proxy is being used here - https://github.com/urllib3/urllib3/blob/main/src/urllib3/connectionpool.py#L1084 by adding appropriate checks.

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

Successfully merging a pull request may close this issue.

2 participants