summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2019-03-07 16:02:26 (GMT)
committerGitHub <noreply@github.com>2019-03-07 16:02:26 (GMT)
commit16e6f7dee7f02bb81aa6b385b982dcdda5b99286 (patch)
treed9d7e262a37abec0b9f756f23b6aa7a4295405b6 /Doc
parent1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8 (diff)
downloadcpython-16e6f7dee7f02bb81aa6b385b982dcdda5b99286.zip
cpython-16e6f7dee7f02bb81aa6b385b982dcdda5b99286.tar.gz
cpython-16e6f7dee7f02bb81aa6b385b982dcdda5b99286.tar.bz2
bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/urllib.parse.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 913e933..af15f5b 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -124,6 +124,11 @@ or on combining URL components into a URL string.
Unmatched square brackets in the :attr:`netloc` attribute will raise a
:exc:`ValueError`.
+ Characters in the :attr:`netloc` attribute that decompose under NFKC
+ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
+ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
+ decomposed before parsing, no error will be raised.
+
.. versionchanged:: 3.2
Added IPv6 URL parsing capabilities.
@@ -136,6 +141,10 @@ or on combining URL components into a URL string.
Out-of-range port numbers now raise :exc:`ValueError`, instead of
returning :const:`None`.
+ .. versionchanged:: 3.8
+ Characters that affect netloc parsing under NFKC normalization will
+ now raise :exc:`ValueError`.
+
.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace', max_num_fields=None)
@@ -259,10 +268,19 @@ or on combining URL components into a URL string.
Unmatched square brackets in the :attr:`netloc` attribute will raise a
:exc:`ValueError`.
+ Characters in the :attr:`netloc` attribute that decompose under NFKC
+ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
+ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
+ decomposed before parsing, no error will be raised.
+
.. versionchanged:: 3.6
Out-of-range port numbers now raise :exc:`ValueError`, instead of
returning :const:`None`.
+ .. versionchanged:: 3.8
+ Characters that affect netloc parsing under NFKC normalization will
+ now raise :exc:`ValueError`.
+
.. function:: urlunsplit(parts)