diff options
author | Steve Dower <steve.dower@microsoft.com> | 2019-03-07 09:08:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 09:08:18 -0800 |
commit | daad2c482c91de32d8305abbccc76a5de8b3a8be (patch) | |
tree | bb72ce9506e926a9934770b53933652bd6316b55 /Doc/library/urllib.parse.rst | |
parent | bf44f48b63c4896c4d744a5c5af7861f8e25ecea (diff) | |
download | cpython-git-daad2c482c91de32d8305abbccc76a5de8b3a8be.tar.gz |
bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201)
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r-- | Doc/library/urllib.parse.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index 0c8f0f6073..b565e1edd3 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.7.3 + 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) @@ -257,10 +266,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.7.3 + Characters that affect netloc parsing under NFKC normalization will + now raise :exc:`ValueError`. + .. function:: urlunsplit(parts) |