Skip to content

Commit 32b2b32

Browse files
qkrwjdanShaneHarvey
authored andcommitted
PYTHON-3800 Add lower() to node when validate hosts of srv records (#1289)
(cherry picked from commit 7d7118b)
1 parent 8212683 commit 32b2b32

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
@@ -108,7 +108,7 @@ def _get_srv_response_and_hosts(self, encapsulate_errors):
108108
# Validate hosts
109109
for node in nodes:
110110
try:
111-
nlist = node[0].split(".")[1:][-self.__slen :]
111+
nlist = node[0].lower().split(".")[1:][-self.__slen :]
112112
except Exception:
113113
raise ConfigurationError(f"Invalid SRV host: {node[0]}")
114114
if self.__plist != nlist:

0 commit comments

Comments
 (0)