From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox] s3-client: fix double URI encoding of copy_object destination key
Date: Wed, 4 Mar 2026 10:55:14 +0100 [thread overview]
Message-ID: <20260304095514.27118-1-h.laimer@proxmox.com> (raw)
build_uri() already calls aws_sign_v4_uri_encode() on its path argument,
so pre-encoding the destination key in copy_object() caused characters
like ':' to be encoded twice ('%3A' -> '%253A'). The server decodes the
URL path once, leaving '%3A' literally in the stored object key instead
of ':'.
The copy source header still requires explicit encoding since it is not
routed through build_uri().
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
proxmox-s3-client/src/client.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/proxmox-s3-client/src/client.rs b/proxmox-s3-client/src/client.rs
index 83176b39..34ac3e8f 100644
--- a/proxmox-s3-client/src/client.rs
+++ b/proxmox-s3-client/src/client.rs
@@ -598,7 +598,6 @@ impl S3Client {
let copy_source = source_key.to_copy_source_key(bucket, &self.options.common_prefix);
let copy_source = aws_sign_v4_uri_encode(©_source, true);
let destination_key = destination_key.to_full_key(&self.options.common_prefix);
- let destination_key = aws_sign_v4_uri_encode(&destination_key, true);
let request = Request::builder()
.method(Method::PUT)
.uri(self.build_uri(&destination_key, &[])?)
--
2.47.3
next reply other threads:[~2026-03-04 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 9:55 Hannes Laimer [this message]
2026-03-04 10:16 ` Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260304095514.27118-1-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.