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

(cherry picked from commit 7d7118bde4)
This commit is contained in:
qkrwjdan 2023-07-06 01:40:20 +09:00 committed by Shane Harvey
parent 8212683a13
commit 32b2b32780

View File

@ -108,7 +108,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: