From af2b8d0b628272a7bda6767a178be2032b822d8c Mon Sep 17 00:00:00 2001
From: Matthijs Wensveen <matthijs.wensveen@gmail.com>
Date: Thu, 12 Oct 2017 11:20:31 +0200
Subject: [PATCH] Symmetric encryption in dup handler is broken (#11274)

---
 handlers/dup.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/handlers/dup.in b/handlers/dup.in
index 43b282f..2a7e85f 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -50,7 +50,9 @@ destdir=${destdir%/}
 [ -n "$desturl" -o -n "$destdir" ]  || fatal "The destination directory (destdir) must be set when desturl is not used."
 [ -n "$include" -o -n "$vsinclude" ]  || fatal "No source includes specified"
 [ -n "$password" ] || fatal "The password option must be set."
-[ -n "$signpassword" -a -n "$signkey" -a -n "$encryptkey" -a "$signkey" != "$encryptkey" ] || fatal "The signpassword option must be set because signkey is different from encryptkey."
+if [ -n "$signkey" -a -n "$encryptkey" -a "$signkey" != "$encryptkey" ]; then
+   [ -n "$signpassword" ] || fatal "The signpassword option must be set because signkey is different from encryptkey."
+fi
 if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]; then
    [ -n "$awsaccesskeyid" -a -n "$awssecretaccesskey" ]  || fatal "AWS access keys must be set for S3 backups."
 fi
-- 
GitLab