all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Hannes Laimer <h.laimer@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox] s3-client: fix double URI encoding of copy_object destination key
Date: Wed, 4 Mar 2026 11:16:07 +0100	[thread overview]
Message-ID: <303ee0a4-ae83-4b3f-8bcb-1481b6a6071b@proxmox.com> (raw)
In-Reply-To: <20260304095514.27118-1-h.laimer@proxmox.com>

Thanks for the patch!

On 3/4/26 10:55 AM, Hannes Laimer wrote:
> 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().

Currently this is only used to rename corrupt chunks on the S3 backend, 
therefore unnoticed since there the object keys do not contain 
characters to be uri encoded.
> 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, &[])?)

Reviewed-by: Christian Ebner <c.ebner@proxmox.com>




      reply	other threads:[~2026-03-04 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04  9:55 Hannes Laimer
2026-03-04 10:16 ` Christian Ebner [this message]

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=303ee0a4-ae83-4b3f-8bcb-1481b6a6071b@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal