File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -535,7 +535,7 @@ def parse_ns_headers(ns_headers):
535535# only kept for backwards compatibilty.
536536IPV4_RE = re .compile (r"\.\d+$" , re .ASCII )
537537
538- def is_ip_like (text : str ):
538+ def is_ip_like_hostname (text : str ):
539539 """Return True if text is a valid hostname in the form of IP address."""
540540 from ipaddress import IPv4Address , IPv6Address
541541 # check for IPv4 address
@@ -556,7 +556,7 @@ def is_HDN(text):
556556 # XXX
557557 # This may well be wrong. Which RFC is HDN defined in, if any (for
558558 # the purposes of RFC 2965)?
559- if is_ip_like (text ):
559+ if is_ip_like_hostname (text ):
560560 return False
561561 if text == "" :
562562 return False
@@ -609,7 +609,7 @@ def liberal_is_HDN(text):
609609 For accepting/blocking domains.
610610
611611 """
612- return not is_ip_like (text )
612+ return not is_ip_like_hostname (text )
613613
614614def user_domain_match (A , B ):
615615 """For blocking/accepting domains.
You can’t perform that action at this time.
0 commit comments