-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
urllib.parse.parse_qsl will happily parse a query string containing '#'.
from urllib.parse import parse_qsl
parse_qsl('foo=#', strict_parsing=True)
Output is [('foo', '#')]
.
But 'foo=#' is an invalid query string according to RFC 3986. Similarly, '[', and ']' are excluded from the set of valid query characters, but parse_qsl parses strings like 'foo=[' and 'foo=]' . In the absence of any allocation of responsibility, this looks like a bug to me.
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error