Skip to content

Commit

Permalink
PYTHON-3800 Add lower() to node when validate hosts of srv records (#…
Browse files Browse the repository at this point in the history
…1289)

(cherry picked from commit 7d7118b)
  • Loading branch information
qkrwjdan authored and ShaneHarvey committed Jul 6, 2023
1 parent 8212683 commit 32b2b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymongo/srv_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _get_srv_response_and_hosts(self, encapsulate_errors):
# 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:
Expand Down

0 comments on commit 32b2b32

Please sign in to comment.