-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix the proxy_bypass_registry function all returning true in some cases. #6302
Conversation
There's no clear description of a bug, how to reproduce or even tests to show this fixes something. Further you speak of empty strings and are filtering on None which are not the same thing. |
The value of proxyOverride is controlled by a third-party program on the computer, so it is not controllable. And filter(function, iterable) is equivalent to the generator expression (item for item in iterable if item) if function is None,that is, all elements of iterable that are false are removed. I think should be avoided for code robustness. |
**Fixed** - **oheaders** from a Response contains `Set-Cookie` entries when it should not. - Static type checker not accepting **list\[str\]** in values for argument **param**. - Static type checker not accepting **Iterable\[bytes\]** for **data**. - Function proxy_bypass_registry for Windows may be fooled by insufficient control on our end. Patch taken from idle upstream PR psf#6302 - SSLError message related to the certificate revocation could print `None` instead of `unspecified` for the reason. **Changed** - Allow setting `None` in max_size for **SharableLimitedDict** to remove limits. - Using `RLock` instead of `Lock` in **SharableLimitedDict**, and **InMemoryRevocationStatus** classes. **Misc** - Missing assert statements for test test_header_validation. - Unrelated warnings are now silent in our test suite. - Unexpected warning now trigger an error in our test suite. - Removed `tests.compat`. - Removed `test-readme`, `flake8`, and `publish` from Makefile. **Added** - Extra-dist install `http3` to force install HTTP/3 support in your environment if not present. - Extra-dist install `ocsp` to force install certificate revocation support in your environment if not present.
**Fixed** - **oheaders** from a Response contains `Set-Cookie` entries when it should not. - Static type checker not accepting **list\[str\]** in values for argument **param**. - Static type checker not accepting **Iterable\[bytes\]** for **data**. - Function proxy_bypass_registry for Windows may be fooled by insufficient control on our end. Patch taken from idle upstream PR psf#6302 - SSLError message related to the certificate revocation could print `None` instead of `unspecified` for the reason. **Changed** - Allow setting `None` in max_size for **SharableLimitedDict** to remove limits. - Using `RLock` instead of `Lock` in **SharableLimitedDict**, and **InMemoryRevocationStatus** classes. **Misc** - Missing assert statements for test test_header_validation. - Unrelated warnings are now silent in our test suite. - Unexpected warning now trigger an error in our test suite. - Removed `tests.compat`. - Removed `test-readme`, `flake8`, and `publish` from Makefile. **Added** - Extra-dist install `http3` to force install HTTP/3 support in your environment if not present. - Extra-dist install `ocsp` to force install certificate revocation support in your environment if not present.
**Fixed** - **oheaders** from a Response contains `Set-Cookie` entries when it should not. - Static type checker not accepting **list\[str\]** in values for argument **param**. - Static type checker not accepting **Iterable\[bytes\]** for **data**. - Function proxy_bypass_registry for Windows may be fooled by insufficient control on our end. Patch taken from idle upstream PR psf#6302 - SSLError message related to the certificate revocation could print `None` instead of `unspecified` for the reason. **Changed** - Allow setting `None` in max_size for **SharableLimitedDict** to remove limits. - Using `RLock` instead of `Lock` in **SharableLimitedDict**, and **InMemoryRevocationStatus** classes. **Misc** - Missing assert statements for test test_header_validation. - Unrelated warnings are now silent in our test suite. - Unexpected warning now trigger an error in our test suite. - Removed `tests.compat`. - Removed `test-readme`, `flake8`, and `publish` from Makefile. **Added** - Extra-dist install `http3` to force install HTTP/3 support in your environment if not present. - Extra-dist install `ocsp` to force install certificate revocation support in your environment if not present.
**Fixed** - **oheaders** from a Response contains `Set-Cookie` entries when it should not. - Static type checker not accepting **list\[str\]** in values for argument **param**. - Static type checker not accepting **Iterable\[bytes\]** for **data**. - Function proxy_bypass_registry for Windows may be fooled by insufficient control on our end. Patch taken from idle upstream PR psf#6302 - SSLError message related to the certificate revocation could print `None` instead of `unspecified` for the reason. **Changed** - Allow setting `None` in max_size for **SharableLimitedDict** to remove limits. - Using `RLock` instead of `Lock` in **SharableLimitedDict**, and **InMemoryRevocationStatus** classes. **Misc** - Missing assert statements for test test_header_validation. - Unrelated warnings are now silent in our test suite. - Unexpected warning now trigger an error in our test suite. - Removed `tests.compat`. - Removed `test-readme`, `flake8`, and `publish` from Makefile. **Added** - Extra-dist install `http3` to force install HTTP/3 support in your environment if not present. - Extra-dist install `ocsp` to force install certificate revocation support in your environment if not present.
Yes, I also noticed this situation. This wastes a lot of my time discovering this problem. ProxyOverride sometimes ends with a semicolon and is difficult to reproduce. But it has not yet been merged into the main branch. |
I'm glad someone else is having the same problem as me, but I also hope that no one will waste time on this issue in the future, haha. |
@flysee can you add tests for this change so it does not regress? |
cd18edd
to
b0942c8
Compare
Of course, test cases have been added. |
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.
@nateprewitt thoughts on getting this into the next release? 2.32 iirc?
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.
Yeah, this seems reasonable. I've put it on the 2.32.0 milestone.
With the context code,i think we should avoid this situation with empty strings,thx!