You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
urllib: Simplify splithost by calling into urlparse. (#1849)
The current regex based splitting produces a wrong result. For example::
http://abc#@def
Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
Copy file name to clipboardExpand all lines: Misc/NEWS
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Core and Builtins
12
12
13
13
- bpo-30682: Removed a too-strict assertion that failed for certain f-strings,
14
14
such as eval("f'\\\n'") and eval("f'\\\r'").
15
-
15
+
16
16
- bpo-30501: The compiler now produces more optimal code for complex condition
17
17
expressions in the "if", "while" and "assert" statement, the "if" expression,
18
18
and generator expressions and comprehensions.
@@ -365,6 +365,11 @@ Extension Modules
365
365
Library
366
366
-------
367
367
368
+
- [Security] bpo-30500: Fix urllib.parse.splithost() to correctly parse
369
+
fragments. For example, ``splithost('http://127.0.0.1#@evil.com/')`` now
370
+
correctly returns the ``127.0.0.1`` host, instead of treating ``@evil.com``
371
+
as the host in an authentification (``login@host``).
372
+
368
373
- bpo-30038: Fix race condition between signal delivery and wakeup file
0 commit comments