PYTHON-5986ClosedFixed

Don't percent-decode the URI host section before splitting hosts

{{_validate_uri}} and {{_parse_srv}} call {{unquote_plus}} on the entire host section of a connection string before splitting it into individual {{host:port}} entries. This is the wrong order of operations per RFC 3986, which specifies splitting on delimiters first and percent-decoding the individual components afterward. Because decoding happens first, a percent-encoded {{,}} or {{:}} in the host section becomes a literal delimiter, so a single host entry can expand into multiple entries in th

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
4.18.2
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
greenerbuild