From 5ade8f3392fb3ad13f20435aef72ce26f7cb9218 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Fri, 22 Mar 2019 13:45:11 +0100 Subject: [PATCH] ACME: Fix missing quotes in variable comparisons MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The variables can be empty if not set in the UCI config. Reported-by: Petr Novák Signed-off-by: Toke Høiland-Jørgensen --- net/acme/Makefile | 2 +- net/acme/files/run.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/acme/Makefile b/net/acme/Makefile index 69dd3441f1..1c2f5fb1d0 100644 --- a/net/acme/Makefile +++ b/net/acme/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acme PKG_VERSION:=2.7.9 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_LICENSE:=GPLv3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/net/acme/files/run.sh b/net/acme/files/run.sh index b0cae8fa64..b7a6f1899b 100644 --- a/net/acme/files/run.sh +++ b/net/acme/files/run.sh @@ -129,7 +129,7 @@ post_checks() iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null - if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ $UPDATE_UHTTPD -eq 1 ] ); then + if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ "$UPDATE_UHTTPD" -eq 1 ] ); then if [ -n "$UHTTPD_LISTEN_HTTP" ]; then uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP" UHTTPD_LISTEN_HTTP= @@ -138,7 +138,7 @@ post_checks() /etc/init.d/uhttpd reload fi - if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ $UPDATE_NGINX -eq 1 ] ); then + if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ "$UPDATE_NGINX" -eq 1 ] ); then NGINX_WEBSERVER=0 /etc/init.d/nginx restart fi @@ -204,7 +204,7 @@ issue_cert() [ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1 log "Running ACME for $main_domain" - + handle_credentials() { local credential="$1" eval export $credential -- 2.30.2