Repository navigation
Release 2.27.1.post4: no_proxy domain boundaries, urllib3 .postN versions - #5
Merged
Merged
Conversation
should_bypass_proxies matched a no_proxy entry with a plain hostname.endswith(entry), so no_proxy=example.com also bypassed the proxy for badexample.com, and that traffic went direct instead of through the configured proxy (which may be the egress filter or the only allowed route). An entry now matches only the exact host (optionally host:port) or a subdomain of it; a leading dot on the entry is ignored. This is the requests port of CPython bpo-39057. Python 2.7's own urllib.proxy_bypass_environment, which requests falls back to, already matches this way. Upstream: psf/requests a4f9a59 (psf#7427), released in 2.34.0. No CVE or GHSA. Test adapted from upstream, plus a badanotherdomain.com case. Python 2.7 safe. Co-Authored-By: Claude <noreply@anthropic.com>
ActiveState's urllib3 security builds now use PEP 440 post-releases (1.26.20.post3, 1.26.20.post4) instead of +security.N local versions. check_compatibility split "1.26.20.post4" into four parts, so the major/minor/patch unpack raised ValueError and every "import requests" emitted a RequestsDependencyWarning (an ImportError under -W error). Only the first three components are parsed now. Adds tests for plain, two-part, +security.N and .postN versions, and for out-of-range ones. Co-Authored-By: Claude <noreply@anthropic.com>
ActiveState release of requests 2.27.1 for Python 2.7 (inventory 2.27.1.4). Switches from the +security.N local version to .postN. Co-Authored-By: Claude <noreply@anthropic.com>
icanhasmath
marked this pull request as ready for review
November 5, 2026 14:31
ezequielp-activestate
approved these changes
Nov 5, 2026
ezequielp-activestate
left a comment
There was a problem hiding this comment.
Approving. No blockers.
🔴 Blockers: None.
Checked
- No missed advisories: OSV for
requests==2.27.1returns only CVE-2023-32681, CVE-2024-35195, CVE-2024-47081 and CVE-2026-25645, matching the description. All four are already in HISTORY from earlier releases. - no_proxy fix: the
should_bypass_proxieschange is line-for-line upstream's a4f9a59 (psf#7427), and its test is the same as upstream's. Upstream has not changed this code since. check_compatibility: keeping only the first three parts of the urllib3 version is correct. A 4-part version like1.26.20.post4used to hit themajor, minor, patchunpack and raise ValueError. chardet and charset_normalizer were already cut to 3 parts.- Python 2.7.18 (
python:2.7container), runningtests/test_utils.pyplustests/test_check_compatibility.py:- The PR gives 223 passed and 10 skipped.
- On the base code, the new tests fail in exactly 5 places: the 2 no_proxy boundary cases (
prelocalhost,badanotherdomain.com) and the 3.postNcases. - With
no_proxy=example.com, the base bypasses the proxy forbadexample.com, while the PR sends it through the proxy.example.com,a.example.com,example.com:8080, ahost:portentry and a leading-dot entry still bypass on the PR. python -W error -c "import requests"succeeds on the PR.
- Python 3.7: the same two test files give 222 passed and 11 skipped, and
import requestsunder-W errorsucceeds.
Not assessed
- The full suite with the
httpbinfixture. The description notes those 165 errors are the same on both trees. - An end-to-end request through a real proxy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ActiveState release requests 2.27.1.post4 for Python 2.7 (inventory 2.27.1.4, Linear PROD-2111). No new CVEs or GHSAs affect 2.27.1: OSV and GitHub's database list only CVE-2023-32681, CVE-2024-35195, CVE-2024-47081 and CVE-2026-25645, all fixed in 2.27.1.1 and 2.27.1.2. This release carries one hardening fix and one compatibility fix.
should_bypass_proxiesmatched entries with a plainendswith, sono_proxy=example.comalso sentbadexample.comdirect instead of through the proxy. Entries now match the exact host (or host:port) or a subdomain, and a leading dot is ignored. Backport of psf/requests a4f9a59 (Port bpo-39057 to Requests psf/requests#7427, 2.34.0), the port of CPython bpo-39057. Python 2.7's ownurllib.proxy_bypass_environmentalready matches this way..postNversions: our urllib3 security builds are now1.26.20.post3/.post4.check_compatibility()split those into four parts and raised ValueError, so everyimport requestsemitted aRequestsDependencyWarning, which is an ImportError under-W error. It now parses only major.minor.patch..postNscheme, where earlier releases used+security.N.Tests (2.7.18): the full suite gives 407 passing against 388 on 2.27.1.3. The 165 errors are the same on both trees, because the
httpbinfixture is missing. Of the new tests, 2 no_proxy cases and 3 compatibility cases fail on 2.27.1.3.Tag
2.27.1.4(the fork's existing tag style) and create the release (--latest=false) after merge.