mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Synchronise tabulation
This commit is contained in:
@@ -132,18 +132,18 @@ def is_hostname_sane(hostname):
|
||||
import string as s
|
||||
allowed = s.ascii_letters + s.digits + "-." # hostnames & IPv4
|
||||
if all([c in allowed for c in hostname]):
|
||||
return True
|
||||
return True
|
||||
|
||||
if not allow_raw_ipv6_server: return False
|
||||
|
||||
# ipv6 is messy and complicated, can contain %zoneindex etc.
|
||||
import socket
|
||||
try:
|
||||
# is this a valid IPv6 address?
|
||||
socket.getaddrinfo(hostname,443,socket.AF_INET6)
|
||||
return True
|
||||
# is this a valid IPv6 address?
|
||||
socket.getaddrinfo(hostname,443,socket.AF_INET6)
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user