Skip to content

Commit 7d7118b

Browse files
authored
PYTHON-3800 Add lower() to node when validate hosts of srv records (#1289)
1 parent 966a5ad commit 7d7118b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymongo/srv_resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def _get_srv_response_and_hosts(
118118
# Validate hosts
119119
for node in nodes:
120120
try:
121-
nlist = node[0].split(".")[1:][-self.__slen :]
121+
nlist = node[0].lower().split(".")[1:][-self.__slen :]
122122
except Exception:
123123
raise ConfigurationError(f"Invalid SRV host: {node[0]}")
124124
if self.__plist != nlist:

0 commit comments

Comments
 (0)