From dfa7ca28bf2e8f5180fcfc4519d8d88bcfc6fec7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 16 Oct 2017 21:31:59 +0200 Subject: [PATCH 1/7] [microdecision] Typo --- data/helpers.d/backend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/helpers.d/backend b/data/helpers.d/backend index c0cbc616c..b715776e2 100644 --- a/data/helpers.d/backend +++ b/data/helpers.d/backend @@ -123,7 +123,7 @@ ynh_add_nginx_config () { # To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable. # Substitute in a nginx config file only if the variable is not empty if test -n "${path_url:-}"; then - # path_url_slash_less if path_url or a blank value if path_url is only '/' + # path_url_slash_less is path_url, or a blank value if path_url is only '/' path_url_slash_less=${path_url%/} ynh_replace_string "__PATH__/" "$path_url_slash_less/" "$finalnginxconf" ynh_replace_string "__PATH__" "$path_url" "$finalnginxconf" From 46469b8893db8bc0e491bfa341261e702cf29789 Mon Sep 17 00:00:00 2001 From: M5oul Date: Tue, 21 Nov 2017 16:46:45 +0100 Subject: [PATCH 2/7] [fix] Update acme-tiny as LE updated its ToS (#386) - fix https://dev.yunohost.org/issues/1007 - Renewing a certificate is not problematic, but creating a certificate for a new domain name may failed according to recent feedbacks. --- src/yunohost/vendor/acme_tiny/acme_tiny.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yunohost/vendor/acme_tiny/acme_tiny.py b/src/yunohost/vendor/acme_tiny/acme_tiny.py index d0ba33d1e..6fd8558d5 100644 --- a/src/yunohost/vendor/acme_tiny/acme_tiny.py +++ b/src/yunohost/vendor/acme_tiny/acme_tiny.py @@ -39,7 +39,7 @@ def get_crt(account_key, csr, acme_dir, log=LOGGER, CA=DEFAULT_CA): raise IOError("OpenSSL Error: {0}".format(err)) pub_hex, pub_exp = re.search( r"modulus:\n\s+00:([a-f0-9\:\s]+?)\npublicExponent: ([0-9]+)", - out.decode('utf8'), re.MULTILINE | re.DOTALL).groups() + out.decode('utf8'), re.MULTILINE|re.DOTALL).groups() pub_exp = "{0:x}".format(int(pub_exp)) pub_exp = "0{0}".format(pub_exp) if len(pub_exp) % 2 else pub_exp header = { @@ -82,10 +82,10 @@ def get_crt(account_key, csr, acme_dir, log=LOGGER, CA=DEFAULT_CA): if proc.returncode != 0: raise IOError("Error loading {0}: {1}".format(csr, err)) domains = set([]) - common_name = re.search(r"Subject:.*? CN=([^\s,;/]+)", out.decode('utf8')) + common_name = re.search(r"Subject:.*? CN\s?=\s?([^\s,;/]+)", out.decode('utf8')) if common_name is not None: domains.add(common_name.group(1)) - subject_alt_names = re.search(r"X509v3 Subject Alternative Name: \n +([^\n]+)\n", out.decode('utf8'), re.MULTILINE | re.DOTALL) + subject_alt_names = re.search(r"X509v3 Subject Alternative Name: \n +([^\n]+)\n", out.decode('utf8'), re.MULTILINE|re.DOTALL) if subject_alt_names is not None: for san in subject_alt_names.group(1).split(", "): if san.startswith("DNS:"): @@ -95,7 +95,7 @@ def get_crt(account_key, csr, acme_dir, log=LOGGER, CA=DEFAULT_CA): log.info("Registering account...") code, result = _send_signed_request(CA + "/acme/new-reg", { "resource": "new-reg", - "agreement": "https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf", + "agreement": json.loads(urlopen(CA + "/directory").read().decode('utf8'))['meta']['terms-of-service'], }) if code == 201: log.info("Registered!") From b560207423194411cf5d3289a4a5c4e0960ca3a7 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 26 Nov 2017 17:29:14 +0100 Subject: [PATCH 3/7] [i18n] Translated using Weblate (French) (#387) Currently translated at 100.0% (355 of 355 strings) --- locales/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/fr.json b/locales/fr.json index 8bda0ddc3..8baccbd70 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -1,7 +1,7 @@ { "action_invalid": "Action « {action:s} » incorrecte", "admin_password": "Mot de passe d'administration", - "admin_password_change_failed": "Impossible de modifier le mot de passe d'administration", + "admin_password_change_failed": "Impossible de changer le mot de passe", "admin_password_changed": "Le mot de passe d'administration a été modifié", "app_already_installed": "{app:s} est déjà installé", "app_argument_choice_invalid": "Choix invalide pour le paramètre « {name:s} », il doit être l'un de {choices:s}", From 7df6874fc999e7615e0bf8082a4f00e161c47656 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Tue, 28 Nov 2017 00:23:43 +0100 Subject: [PATCH 4/7] [fix] Open NTP port to update date --- data/templates/yunohost/firewall.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/templates/yunohost/firewall.yml b/data/templates/yunohost/firewall.yml index df5b0fe88..3ee284d97 100644 --- a/data/templates/yunohost/firewall.yml +++ b/data/templates/yunohost/firewall.yml @@ -4,7 +4,7 @@ uPnP: UDP: [53] ipv4: TCP: [22, 25, 53, 80, 443, 465, 587, 993, 5222, 5269] - UDP: [53, 5353] + UDP: [53, 5353, 123] ipv6: TCP: [22, 25, 53, 80, 443, 465, 587, 993, 5222, 5269] - UDP: [53, 5353] + UDP: [53, 5353, 123] From b0849cc43d944dd9b68ee5e15c3d6cb02730c8c5 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Tue, 28 Nov 2017 00:25:06 +0100 Subject: [PATCH 5/7] Bad branch --- data/templates/yunohost/firewall.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/templates/yunohost/firewall.yml b/data/templates/yunohost/firewall.yml index 3ee284d97..df5b0fe88 100644 --- a/data/templates/yunohost/firewall.yml +++ b/data/templates/yunohost/firewall.yml @@ -4,7 +4,7 @@ uPnP: UDP: [53] ipv4: TCP: [22, 25, 53, 80, 443, 465, 587, 993, 5222, 5269] - UDP: [53, 5353, 123] + UDP: [53, 5353] ipv6: TCP: [22, 25, 53, 80, 443, 465, 587, 993, 5222, 5269] - UDP: [53, 5353, 123] + UDP: [53, 5353] From 17ba10ad924bebc94914cb7209164a356a39b499 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 28 Nov 2017 19:58:51 +0100 Subject: [PATCH 6/7] [fix] Fix helper for old apps without backup script (#388) --- data/helpers.d/utils | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 44c679471..2cb18c5c0 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -59,14 +59,19 @@ ynh_restore_upgradebackup () { # ynh_abort_if_errors # ynh_backup_before_upgrade () { + if [ ! -e "/etc/yunohost/apps/$app/scripts/backup" ] + then + echo "This app doesn't have any backup script." >&2 + return + fi backup_number=1 old_backup_number=2 app_bck=${app//_/-} # Replace all '_' by '-' - - # Check if a backup already exists with the prefix 1 + + # Check if a backup already exists with the prefix 1 if sudo yunohost backup list | grep -q $app_bck-pre-upgrade1 - then - # Prefix becomes 2 to preserve the previous backup + then + # Prefix becomes 2 to preserve the previous backup backup_number=2 old_backup_number=1 fi @@ -74,7 +79,7 @@ ynh_backup_before_upgrade () { # Create backup sudo yunohost backup create --ignore-system --apps $app --name $app_bck-pre-upgrade$backup_number if [ "$?" -eq 0 ] - then + then # If the backup succeeded, remove the previous backup if sudo yunohost backup list | grep -q $app_bck-pre-upgrade$old_backup_number then From cb1728f32c701219c6a4692c1940883eb1d084ae Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 28 Nov 2017 21:06:16 +0100 Subject: [PATCH 7/7] Remove port 53 from UPnP (but keep it open on local network) (#362) --- data/templates/yunohost/firewall.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/templates/yunohost/firewall.yml b/data/templates/yunohost/firewall.yml index df5b0fe88..201a39092 100644 --- a/data/templates/yunohost/firewall.yml +++ b/data/templates/yunohost/firewall.yml @@ -1,7 +1,7 @@ uPnP: enabled: false - TCP: [22, 25, 53, 80, 443, 465, 587, 993, 5222, 5269] - UDP: [53] + TCP: [22, 25, 80, 443, 465, 587, 993, 5222, 5269] + UDP: [] ipv4: TCP: [22, 25, 53, 80, 443, 465, 587, 993, 5222, 5269] UDP: [53, 5353]