From 1e86957f100fc0f5edaf9785079cf4946c89e9d3 Mon Sep 17 00:00:00 2001 From: servusoft Date: Sat, 10 Feb 2018 18:49:18 +0100 Subject: [PATCH 1/4] split SSL params to 'secure' and 'verify' --- upload.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index 314043d..bee73a8 100755 --- a/upload.sh +++ b/upload.sh @@ -14,6 +14,10 @@ if [ -z "$PLUGIN_SECURE" ]; then PLUGIN_SECURE="true" fi +if [ -z "$PLUGIN_VERIFY" ]; then + PLUGIN_VERIFY="true" +fi + if [ -z "$PLUGIN_DEST_DIR" ]; then PLUGIN_DEST_DIR="/" fi @@ -34,4 +38,11 @@ for i in "${in_arr[@]}"; do PLUGIN_INCLUDE_STR="$PLUGIN_INCLUDE_STR -x $i" done -lftp -e "set xfer:log 1; set ftp:ssl-force $PLUGIN_SECURE; set ftp:ssl-protect-data $PLUGIN_SECURE; set ftp:ssl-allow $PLUGIN_SECURE; mirror -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" -u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME +lftp -e "set xfer:log 1; \ + set ftp:ssl-allow $PLUGIN_SECURE; \ + set ftp:ssl-force $PLUGIN_SECURE; \ + set ftp:ssl-protect-data $PLUGIN_SECURE; \ + set ssl:verify-certificate $PLUGIN_VERIFY; \ + set ssl:check-hostname $PLUGIN_VERIFY; \ + mirror --verbose -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" \ + -u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME From f395d6523e2c3d2d28a2d2f719bfa72dc81224b4 Mon Sep 17 00:00:00 2001 From: servusoft Date: Sun, 11 Feb 2018 16:13:35 +0100 Subject: [PATCH 2/4] Update README.md add `verify` option --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba34b40..53aba0a 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,8 @@ pipeline: image: cschlosser/drone-ftps hostname: example.com:21 secrets: [ ftp_username, ftp_password ] - secure: true + secure: true | false # true = use FTP(S), false = FTP without SSL + verify: true | false # true = strong SSL fversification, false = supress SSL versification error dest_dir: /var/www/mysite src_dir: /mysite/static exclude: From 75c81f26baa0d6e253c2d6e226be55f9f3c93748 Mon Sep 17 00:00:00 2001 From: servusoft Date: Sun, 11 Feb 2018 16:15:08 +0100 Subject: [PATCH 3/4] Update README.md typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53aba0a..1cee34a 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ pipeline: hostname: example.com:21 secrets: [ ftp_username, ftp_password ] secure: true | false # true = use FTP(S), false = FTP without SSL - verify: true | false # true = strong SSL fversification, false = supress SSL versification error + verify: true | false # true = strong SSL verification, false = supress SSL versification error dest_dir: /var/www/mysite src_dir: /mysite/static exclude: From 82885be8fad9e81c22297cadf4a6043288c11ecf Mon Sep 17 00:00:00 2001 From: servusoft Date: Mon, 12 Feb 2018 23:24:42 +0100 Subject: [PATCH 4/4] Update README.md add default value vor 'secure' and 'verify' --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cee34a..084f657 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ pipeline: image: cschlosser/drone-ftps hostname: example.com:21 secrets: [ ftp_username, ftp_password ] - secure: true | false # true = use FTP(S), false = FTP without SSL - verify: true | false # true = strong SSL verification, false = supress SSL versification error + secure: true (default) | false # true = use FTP(S), false = FTP without SSL + verify: true (default) | false # true = strong SSL verification, false = supress SSL verification error dest_dir: /var/www/mysite src_dir: /mysite/static exclude: