PYTHON-5990ClosedFixed
Reject Unix domain socket KMS endpoints in client-side field level encryption
{{_EncryptionIO.kms_request}} passes the KMS endpoint surfaced by libmongocrypt straight to {{parse_host(endpoint, 443)}}. {{parse_host}} returns any string ending in {{.sock}} verbatim, skipping the hostname/port validation applied to every other input. {{_create_connection}} (and the async equivalent in {{pymongo/pool_shared.py}}) then treats an address ending in {{.sock}} as a Unix domain socket path and connects to it with {{AF_UNIX}}. libmongocrypt builds that endpoint from {{masterKey.end