From 7227adcca2ada4fed34ad35bd765ed1c67cecbcf Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Sun, 3 Apr 2022 02:31:55 +0100 Subject: [PATCH] Rigorously quote all use of "$EASYRSA_BATCH" Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 523cb31..ecfa603 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -984,7 +984,7 @@ gen_dh() { # check to see if we already have a dh parameters file if [ -e "$EASYRSA_PKI/dh.pem" ]; then - if [ "$EASYRSA_BATCH" = "1" ]; then + if [ "$EASYRSA_BATCH" ]; then # if batch is enabled, die die "file $EASYRSA_PKI/dh.pem already exists!" else @@ -1063,7 +1063,7 @@ $EASYRSA_EXTRA_EXTS" key_out_tmp="$(easyrsa_mktemp)" || die "Failed to create temporary file" req_out_tmp="$(easyrsa_mktemp)" || die "Failed to create temporary file" # generate request - [ $EASYRSA_BATCH ] && opts="$opts -batch" + [ "$EASYRSA_BATCH" ] && opts="$opts -batch" # shellcheck disable=2086,2148 algo_opts="" if [ "ed" = "$EASYRSA_ALGO" ]; then