1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
From 52861eab5de20af3d4a0838d7f44af5113a79f23 Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Mon, 14 Oct 2019 18:43:49 +0200
Subject: [PATCH 1/2] Fix default value of CHALLENGE_PATH variable in uacme.sh
Single quotes don't work inside parameter expansion as in other places.
They are not stripped during expansion but become part of the value.
Thus this will result in:
CHALLENGE_PATH="'/var/www/.well-known/acme-challenge'"
Since the default path doesn't contain any spaces, it's not needed to
quote it at all.
This bug was introduced in 8f8b9faddcae58ba250923bfc2febf6229a6ef21.
Patch-Source: https://github.com/ndilieto/uacme/pull/12
---
uacme.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/uacme.sh b/uacme.sh
index fbcea8d..0a1ff8d 100755
--- a/uacme.sh
+++ b/uacme.sh
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-CHALLENGE_PATH="${UACME_CHALLENGE_PATH:-'/var/www/.well-known/acme-challenge'}"
+CHALLENGE_PATH="${UACME_CHALLENGE_PATH:-/var/www/.well-known/acme-challenge}"
ARGS=5
E_BADARGS=85
From 82cca7aa9fe3b7a016ef31d97f4799f87bba4bfb Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Mon, 14 Oct 2019 19:06:15 +0200
Subject: [PATCH 2/2] Quote variables that may contain spaces
---
uacme.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/uacme.sh b/uacme.sh
index 0a1ff8d..e3cfdbc 100755
--- a/uacme.sh
+++ b/uacme.sh
@@ -22,7 +22,7 @@ E_BADARGS=85
if test $# -ne "$ARGS"
then
- echo "Usage: `basename $0` method type ident token auth" 1>&2
+ echo "Usage: $(basename "$0") method type ident token auth" 1>&2
exit $E_BADARGS
fi
@@ -36,7 +36,7 @@ case "$METHOD" in
"begin")
case "$TYPE" in
http-01)
- echo -n "${AUTH}" > ${CHALLENGE_PATH}/${TOKEN}
+ echo -n "${AUTH}" > "${CHALLENGE_PATH}/${TOKEN}"
exit $?
;;
*)
@@ -48,7 +48,7 @@ case "$METHOD" in
"done"|"failed")
case "$TYPE" in
http-01)
- rm ${CHALLENGE_PATH}/${TOKEN}
+ rm "${CHALLENGE_PATH}/${TOKEN}"
exit $?
;;
*)
|