From ca1dfda799ee14bbbec763ac4d6f0f17e1414f93 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 13 Jun 2022 19:13:45 +0200 Subject: Adding quotes arround some variables in dehydrated-tools to prevent globbing and word splitting. Signed-off-by: Daniel Baumann --- dehydrated/bin/dehydrated-nsupdate | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dehydrated/bin') diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate index 96c95eb..61c2e84 100755 --- a/dehydrated/bin/dehydrated-nsupdate +++ b/dehydrated/bin/dehydrated-nsupdate @@ -109,12 +109,12 @@ NAMESERVERS_IPV4="" for NAMESERVER in ${NAMESERVERS} do - if [ -n "$(${DIG} +nocomments +noquestion +short AAAA ${NAMESERVER})" ] + if [ -n "$(${DIG} +nocomments +noquestion +short AAAA "${NAMESERVER}")" ] then NAMESERVERS_IPV6="${NAMESERVERS_IPV6} ${NAMESERVER}" fi - if [ -n "$(${DIG} +nocomments +noquestion +short A ${NAMESERVER})" ] + if [ -n "$(${DIG} +nocomments +noquestion +short A "${NAMESERVER}")" ] then NAMESERVERS_IPV4="${NAMESERVERS_IPV4} ${NAMESERVER}" fi @@ -133,7 +133,7 @@ then NAMESERVERS="${NAMESERVERS} ${NAMESERVERS_IPV4}" fi -NAMESERVERS="$(echo ${NAMESERVERS} | sed -e 's| |\n|g' | sort -u -V)" +NAMESERVERS="$(echo "${NAMESERVERS}" | sed -e 's| |\n|g' | sort -u -V)" # update nameservers if [ -n "${TSIG_KEYFILE}" ] && [ -e "${TSIG_KEYFILE}" ] -- cgit v1.2.3