From 0e8fde48da52de701624fd4ff1bce161ca5280a1 Mon Sep 17 00:00:00 2001 From: Erwan MAS Date: Wed, 8 Jul 2020 17:33:52 +0000 Subject: [PATCH] quote some arguments to protect from shell file globbing ( can append when message contains a * ) --- ocicli/ocicli | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocicli/ocicli b/ocicli/ocicli index b9c112f4..6de43cd1 100755 --- a/ocicli/ocicli +++ b/ocicli/ocicli @@ -99,7 +99,7 @@ ocicli_call (){ if ! [ "${STATUS}" = "success" ] ; then echo "Could not query API:" MESSAGE=$(cat ${API_RESPONSE_FILE} | jq -r '.["message"]') - echo $MESSAGE + echo "$MESSAGE" rm ${API_RESPONSE_FILE} exit 1 fi @@ -212,7 +212,7 @@ ocicli_machine_list (){ fi JQFL=${JQFL}'"' - echo ${HEAD} + echo "${HEAD}" cat ${API_RESPONSE_FILE} | jq -r "${JQFL}" # if [ "${1}" = "-a" ] ; then # echo "serial,Cur_ip,dhcp_ip,memory,status,puppet,lastseen,cluster,location,swiftregion,ladvd,product_name,BIOSver,Lifecycle,IPMIver,IPMI_IP,hostname,notes,dc,row,rack,ustart,uend" -- GitLab