Merge pull request #257 from YunoHost/fix_localhost_address_range

[fix] Any address in the range 127.0.0.0/8 is a valid loopback address
This commit is contained in:
M5oul 2017-02-17 14:20:13 +01:00 committed by GitHub
commit f80653580c

View file

@ -860,8 +860,8 @@ def _domain_is_resolved_locally(public_ip, domain):
logger.debug("Couldn't get domain '%s' ip because: %s" % (domain, e))
return False
logger.debug("Domain '%s' ip is %s, except it to be 127.0.0.1 or %s" % (domain, ip, public_ip))
return ip in ["127.0.0.1", public_ip]
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():