I'm experiencing a regression in master branch, probably caused by commit e963438c5a5d58ce3f997eef1e8e25f3cb4238d8 (make shellcheck happy again), specifically the following lines:
@@ -1083,12 +1096,12 @@ sign_csr() {
if [[ ${num_pending_challenges} -ne 0 ]]; then
echo " + Deploying challenge tokens..."
if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" = "yes" ]]; then
- "${HOOK}" "deploy_challenge" ${deploy_args[@]} || _exiterr 'deploy_challenge hook returned with non-zero exit code'
+ "${HOOK}" "deploy_challenge" "${deploy_args[@]}" || _exiterr 'deploy_challenge hook returned with non-zero exit code'
elif [[ -n "${HOOK}" ]]; then
# Run hook script to deploy the challenge token
local idx=0
while [ ${idx} -lt ${num_pending_challenges} ]; do
- "${HOOK}" "deploy_challenge" ${deploy_args[${idx}]} || _exiterr 'deploy_challenge hook returned with non-zero exit code'
+ "${HOOK}" "deploy_challenge" "${deploy_args[${idx}]}" || _exiterr 'deploy_challenge hook returned with non-zero exit code'
idx=$((idx+1))
done
fi
The result of the change appears to be that instead of the hook.sh deploy_challenge being passed three arguments (the expanded ${deploy_args[${idx}]}), it is now passed one argument ("${deploy_args[${idx}]}", which expands to a string consisting of the three arguments joined by spaces).
I suspect the modified call to the hook for clean_challenge is also broken in the same way.
To reproduce the issue, just run dehydrated with a stock hook.
I'm experiencing a regression in master branch, probably caused by commit
e963438c5a5d58ce3f997eef1e8e25f3cb4238d8
(make shellcheck happy again), specifically the following lines:The result of the change appears to be that instead of the hook.sh
deploy_challenge
being passed three arguments (the expanded${deploy_args[${idx}]}
), it is now passed one argument ("${deploy_args[${idx}]}"
, which expands to a string consisting of the three arguments joined by spaces).I suspect the modified call to the hook for
clean_challenge
is also broken in the same way.To reproduce the issue, just run dehydrated with a stock hook.