From bd5d74ca28d88229595b2af2ff27b2972f6acc25 Mon Sep 17 00:00:00 2001 From: opi Date: Mon, 3 Nov 2014 23:43:38 +0100 Subject: [PATCH] [enh] Use https when calling dyndns api. --- domain.py | 2 +- tools.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/domain.py b/domain.py index 8218a9f65..76ed1c5a2 100644 --- a/domain.py +++ b/domain.py @@ -92,7 +92,7 @@ def domain_add(auth, domain, dyndns=False): from yunohost.dyndns import dyndns_subscribe try: - r = requests.get('http://dyndns.yunohost.org/domains') + r = requests.get('https://dyndns.yunohost.org/domains') except ConnectionError: pass else: diff --git a/tools.py b/tools.py index ed92bd9de..4ed21cb2d 100644 --- a/tools.py +++ b/tools.py @@ -193,7 +193,7 @@ def tools_maindomain(auth, old_domain=None, new_domain=None, dyndns=False): if dyndns and len(new_domain.split('.')) >= 3: try: - r = requests.get('http://dyndns.yunohost.org/domains') + r = requests.get('https://dyndns.yunohost.org/domains') except ConnectionError: pass else: @@ -231,14 +231,14 @@ def tools_postinstall(domain, password, ignore_dyndns=False): if len(domain.split('.')) >= 3 and not ignore_dyndns: try: - r = requests.get('http://dyndns.yunohost.org/domains') + r = requests.get('https://dyndns.yunohost.org/domains') except ConnectionError: pass else: dyndomains = json.loads(r.text) dyndomain = '.'.join(domain.split('.')[1:]) 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 else: raise MoulinetteError(errno.EEXIST,