From fabfa2641caefb308d9c82dd62fe1757c4105ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 21 Oct 2022 15:10:43 +0200 Subject: [PATCH] Read in base64 encoded keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Files/ObjectStore/S3ConnectionTrait.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index 69d405f31b6ba..816065147d0a7 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -243,10 +243,11 @@ protected function getSSECParameters(): array { return []; } + $rawKey = base64_decode($key); return [ 'SSECustomerAlgorithm' => 'AES256', - 'SSECustomerKey' => $key, - 'SSECustomerKeyMD5' => md5($key, true) + 'SSECustomerKey' => $rawKey, + 'SSECustomerKeyMD5' => md5($rawKey, true) ]; } }