This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 2aa3bb6c00 fix(utils): use getaddrinfo for hostname check to support 
ipv6 (#21042)
2aa3bb6c00 is described below

commit 2aa3bb6c00fa4a86680622e714f818b46962155d
Author: vin01 <[email protected]>
AuthorDate: Fri Sep 2 01:27:50 2022 +0000

    fix(utils): use getaddrinfo for hostname check to support ipv6 (#21042)
---
 superset/utils/network.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/utils/network.py b/superset/utils/network.py
index 8079a96e20..8ae08d2c01 100644
--- a/superset/utils/network.py
+++ b/superset/utils/network.py
@@ -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

Reply via email to