Skip to content

Commit cdfc7a9

Browse files
committed
Fix test failures from curl warnings that --ftp-ssl is insecure
Replaced with --ssl-reqd. Note that --ftp-ssl-reqd is an old alias for --ssl-reqd. --ftp-ssl-reqd is equivalent, but could eventually go away. -ssl-reqd has been supported since curl version 7.20.0 - in 2010 (though a related CVE was fixed in 7.79.0 in 2021...) So this change shouldn't inconvenience any getssl users.
1 parent 11436b2 commit cdfc7a9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

getssl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,14 +1115,14 @@ copy_file_to_location() { # copies a file, using scp, sftp or ftp if required.
11151115
SFTP_PORT=":990"
11161116
fi
11171117
# shellcheck disable=SC2086
1118-
debug curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftps://${ftphost}${SFTP_PORT}/${ftpdirn}/"
1118+
debug curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftps://${ftphost}${SFTP_PORT}/${ftpdirn}/"
11191119
# shellcheck disable=SC2086
1120-
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftps://${ftphost}${SFTP_PORT}/${ftpdirn}/"
1120+
curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftps://${ftphost}${SFTP_PORT}/${ftpdirn}/"
11211121
else
11221122
# shellcheck disable=SC2086
1123-
debug curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftp://${ftphost}${SFTP_PORT}/${ftpdirn}/"
1123+
debug curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftp://${ftphost}${SFTP_PORT}/${ftpdirn}/"
11241124
# shellcheck disable=SC2086
1125-
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftp://${ftphost}${SFTP_PORT}/${ftpdirn}/"
1125+
curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u "${ftpuser}:${ftppass}" -T "${fromdir}/${fromfile}" "ftp://${ftphost}${SFTP_PORT}/${ftpdirn}/"
11261126
fi
11271127
else
11281128
if ! mkdir -p "$(dirname "$to")" ; then
@@ -1620,10 +1620,10 @@ for d in "${alldomains[@]}"; do
16201620
if [[ "${to:0:5}" == "ftps:" ]] ; then
16211621
[ -z "$FTP_PORT" ] && SFTP_PORT=":990"
16221622
# shellcheck disable=SC2086
1623-
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE /${ftplocn}/${token:?}}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
1623+
curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE /${ftplocn}/${token:?}}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
16241624
else
16251625
# shellcheck disable=SC2086
1626-
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE /${ftplocn}/${token:?}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
1626+
curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE /${ftplocn}/${token:?}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/"
16271627
fi
16281628
else
16291629
rm -f "${t_loc:?}/${token:?}"

0 commit comments

Comments
 (0)