Skip to content

Commit c723d51

Browse files
orsenthilgpshead
andauthored
[3.7] bpo-43882 - Mention urllib.parse changes in Whats New section for 3.7.11 (GH-26267)
Co-authored-by: Gregory P. Smith <[email protected]>
1 parent 1beae7e commit c723d51

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/whatsnew/3.7.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,3 +2594,13 @@ IPv4 address sent from the remote server when setting up a passive data
25942594
channel. We reuse the ftp server IP address instead. For unusual code
25952595
requiring the old behavior, set a ``trust_server_pasv_ipv4_address``
25962596
attribute on your FTP instance to ``True``. (See :issue:`43285`)
2597+
2598+
2599+
The presence of newline or tab characters in parts of a URL allows for some
2600+
forms of attacks. Following the WHATWG specification that updates RFC 3986,
2601+
ASCII newline ``\n``, ``\r`` and tab ``\t`` characters are stripped from the
2602+
URL by the parser :func:`urllib.parse` preventing such attacks. The removal
2603+
characters are controlled by a new module level variable
2604+
``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :issue:`43882`)
2605+
2606+

0 commit comments

Comments
 (0)