Skip to content

Commit

Permalink
Fix curl not using path when deleting challenge tokens
Browse files Browse the repository at this point in the history
curl isn't changing directory to the specified directory.

Make it explicit in the DELE command.
  • Loading branch information
tlhackque committed Mar 25, 2024
1 parent 68b5f42 commit 11436b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions getssl
Original file line number Diff line number Diff line change
Expand Up @@ -1620,10 +1620,10 @@ for d in "${alldomains[@]}"; do
if [[ "${to:0:5}" == "ftps:" ]] ; then
[ -z "$FTP_PORT" ] && SFTP_PORT=":990"
# shellcheck disable=SC2086
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE /${ftplocn}/${token:?}}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
else
# shellcheck disable=SC2086
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE /${ftplocn}/${token:?}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
fi
else
rm -f "${t_loc:?}/${token:?}"
Expand Down

0 comments on commit 11436b2

Please sign in to comment.