[enh] Use https when calling dyndns api.

This commit is contained in:
opi 2014-11-03 23:43:38 +01:00
parent 8e597109be
commit bd5d74ca28
2 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ def domain_add(auth, domain, dyndns=False):
from yunohost.dyndns import dyndns_subscribe from yunohost.dyndns import dyndns_subscribe
try: try:
r = requests.get('http://dyndns.yunohost.org/domains') r = requests.get('https://dyndns.yunohost.org/domains')
except ConnectionError: except ConnectionError:
pass pass
else: else:

View file

@ -193,7 +193,7 @@ def tools_maindomain(auth, old_domain=None, new_domain=None, dyndns=False):
if dyndns and len(new_domain.split('.')) >= 3: if dyndns and len(new_domain.split('.')) >= 3:
try: try:
r = requests.get('http://dyndns.yunohost.org/domains') r = requests.get('https://dyndns.yunohost.org/domains')
except ConnectionError: except ConnectionError:
pass pass
else: else:
@ -231,14 +231,14 @@ def tools_postinstall(domain, password, ignore_dyndns=False):
if len(domain.split('.')) >= 3 and not ignore_dyndns: if len(domain.split('.')) >= 3 and not ignore_dyndns:
try: try:
r = requests.get('http://dyndns.yunohost.org/domains') r = requests.get('https://dyndns.yunohost.org/domains')
except ConnectionError: except ConnectionError:
pass pass
else: else:
dyndomains = json.loads(r.text) dyndomains = json.loads(r.text)
dyndomain = '.'.join(domain.split('.')[1:]) dyndomain = '.'.join(domain.split('.')[1:])
if dyndomain in dyndomains: if dyndomain in dyndomains:
if requests.get('http://dyndns.yunohost.org/test/%s' % domain).status_code == 200: if requests.get('https://dyndns.yunohost.org/test/%s' % domain).status_code == 200:
dyndns=True dyndns=True
else: else:
raise MoulinetteError(errno.EEXIST, raise MoulinetteError(errno.EEXIST,