PYTHON-3800 Add lower() to node when validate hosts of srv records (#1289)

This commit is contained in:
qkrwjdan 2023-07-06 01:40:20 +09:00 committed by GitHub
parent 966a5adc4a
commit 7d7118bde4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ class _SrvResolver:
# Validate hosts
for node in nodes:
try:
nlist = node[0].split(".")[1:][-self.__slen :]
nlist = node[0].lower().split(".")[1:][-self.__slen :]
except Exception:
raise ConfigurationError(f"Invalid SRV host: {node[0]}")
if self.__plist != nlist: