From e16072630f8a0b8f8a93673e8719c43b3c3d1f22 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 5 Nov 2023 03:40:36 +0100 Subject: [PATCH] packages/s3ql: limit signed headers --- patches/base/s3ql/s3v4.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/base/s3ql/s3v4.patch b/patches/base/s3ql/s3v4.patch index af6aca7..9fdaf71 100644 --- a/patches/base/s3ql/s3v4.patch +++ b/patches/base/s3ql/s3v4.patch @@ -22,7 +22,7 @@ index d19b783..5b5831f 100644 - else: - return d.digest() diff --git a/src/s3ql/backends/s3c.py b/src/s3ql/backends/s3c.py -index 11687d5..cfb1893 100644 +index 11687d5..05750b9 100644 --- a/src/s3ql/backends/s3c.py +++ b/src/s3ql/backends/s3c.py @@ -78,6 +78,8 @@ class Backend(AbstractBackend, metaclass=ABCDocstMeta): @@ -102,7 +102,7 @@ index 11687d5..cfb1893 100644 + auth_strs.append(s) + + # Headers -+ sig_hdrs = sorted(x.lower() for x in headers.keys()) ++ sig_hdrs = sorted(x for x in (x.lower() for x in headers.keys()) if x == "host" or x == "content-type" or x.startswith("x-amz-")) + for hdr in sig_hdrs: + auth_strs.append('%s:%s' % (hdr, headers[hdr].strip())) + auth_strs.append('')