Skip to content

Commit

Permalink
fix(utils): use getaddrinfo for hostname check to support ipv6 (#21042)
Browse files Browse the repository at this point in the history
  • Loading branch information
vin01 authored Sep 2, 2022
1 parent 222f1e7 commit 2aa3bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/utils/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def is_hostname_valid(host: str) -> bool:
Test if a given hostname can be resolved.
"""
try:
socket.gethostbyname(host)
socket.getaddrinfo(host, None)
return True
except socket.gaierror:
return False
Expand Down

0 comments on commit 2aa3bb6

Please sign in to comment.