Skip to content

Commit f14015a

Browse files
orsenthilgpshead
andauthored
[3.10] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26275)
* [3.10] bpo-43882 - Mention urllib.parse changes in Whats new section. * escape the \n chars, ReSTify :rfc:, urllib.parse is a :mod: * minor formatting. Co-authored-by: Gregory P. Smith <[email protected]>
1 parent ee51c56 commit f14015a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Doc/whatsnew/3.10.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,13 @@ functions internally. For more details, please see their respective
13371337
documentation.
13381338
(Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)
13391339
1340+
The presence of newline or tab characters in parts of a URL allows for some
1341+
forms of attacks. Following the WHATWG specification that updates :rfc:`3986`,
1342+
ASCII newline ``\n``, ``\r`` and tab ``\t`` characters are stripped from the
1343+
URL by the parser in :mod:`urllib.parse` preventing such attacks. The removal
1344+
characters are controlled by a new module level variable
1345+
``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :issue:`43882`)
1346+
13401347
xml
13411348
---
13421349

0 commit comments

Comments
 (0)