mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Remove check that domain is resolved locally
This commit is contained in:
parent
02ea0c0656
commit
b892284266
1 changed files with 0 additions and 18 deletions
|
@ -819,13 +819,6 @@ def _check_domain_is_ready_for_ACME(domain):
|
|||
raise MoulinetteError(errno.EINVAL, m18n.n(
|
||||
'certmanager_domain_http_not_working', domain=domain))
|
||||
|
||||
# Check if domain is resolved locally (Might happen despite the previous
|
||||
# checks because of dns propagation ?... Acme-tiny won't work in that case,
|
||||
# because it explicitly requests() the domain.)
|
||||
if not _domain_is_resolved_locally(public_ip, domain):
|
||||
raise MoulinetteError(errno.EINVAL, m18n.n(
|
||||
'certmanager_domain_not_resolved_locally', domain=domain))
|
||||
|
||||
|
||||
def _dns_ip_match_public_ip(public_ip, domain):
|
||||
try:
|
||||
|
@ -854,17 +847,6 @@ def _domain_is_accessible_through_HTTP(ip, domain):
|
|||
return True
|
||||
|
||||
|
||||
def _domain_is_resolved_locally(public_ip, domain):
|
||||
try:
|
||||
ip = socket.gethostbyname(domain)
|
||||
except socket.error as e:
|
||||
logger.debug("Couldn't get domain '%s' ip because: %s" % (domain, e))
|
||||
return False
|
||||
|
||||
logger.debug("Domain '%s' IP address is resolved to %s, expect it to be %s or in the 127.0.0.0/8 address block" % (domain, public_ip, ip))
|
||||
return ip.startswith("127.") or ip == public_ip
|
||||
|
||||
|
||||
def _name_self_CA():
|
||||
ca_conf = os.path.join(SSL_DIR, "openssl.ca.cnf")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue