Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bab4143

Browse files
committed
SF patch #1116583: NameError in cookielib domain check
1 parent ab63050 commit bab4143

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/cookielib.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,11 +1134,10 @@ def domain_return_ok(self, domain, request):
11341134
# having to load lots of MSIE cookie files unless necessary.
11351135
req_host, erhn = eff_request_host(request)
11361136
if not req_host.startswith("."):
1137-
dotted_req_host = "."+req_host
1137+
req_host = "."+req_host
11381138
if not erhn.startswith("."):
1139-
dotted_erhn = "."+erhn
1140-
if not (dotted_req_host.endswith(domain) or
1141-
dotted_erhn.endswith(domain)):
1139+
erhn = "."+erhn
1140+
if not (req_host.endswith(domain) or erhn.endswith(domain)):
11421141
#debug(" request domain %s does not match cookie domain %s",
11431142
# req_host, domain)
11441143
return False

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ Luke Mewburn
399399
Mike Meyer
400400
Steven Miale
401401
Trent Mick
402+
Chad Miller
402403
Roman Milner
403404
Dom Mitchell
404405
Doug Moen

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Extension Modules
5151
Library
5252
-------
5353

54+
- Fixed bug in a NameError bug in cookielib. Patch #1116583.
55+
5456
- Applied a security fix to SimpleXMLRPCserver (PSF-2005-001). This
5557
disables recursive traversal through instance attributes, which can
5658
be exploited in various ways.

0 commit comments

Comments
 (0)