public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox] s3-client: fix double URI encoding of copy_object destination key
@ 2026-03-04  9:55 Hannes Laimer
  2026-03-04 10:16 ` Christian Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2026-03-04  9:55 UTC (permalink / raw)
  To: pbs-devel

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(&copy_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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-04 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-04  9:55 [PATCH proxmox] s3-client: fix double URI encoding of copy_object destination key Hannes Laimer
2026-03-04 10:16 ` Christian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal