public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>,
	pbs-devel@lists.proxmox.com
Subject: Re: [PATCH backup v3 3/3] client: rename password to blob
Date: Wed, 4 Mar 2026 09:49:09 +0100	[thread overview]
Message-ID: <d0f2bcd2-e806-47bb-8579-bcdd67ed8fe6@proxmox.com> (raw)
In-Reply-To: <20260223093710.36009-4-m.sandoval@proxmox.com>

On 2/23/26 10:37 AM, Maximiliano Sandoval wrote:
> This is a Vec<u8> and not yet the password in its final form.
> 
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>   pbs-client/src/tools/mod.rs | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/pbs-client/src/tools/mod.rs b/pbs-client/src/tools/mod.rs
> index f28d9f32f..aa3ae94f2 100644
> --- a/pbs-client/src/tools/mod.rs
> +++ b/pbs-client/src/tools/mod.rs
> @@ -167,8 +167,8 @@ fn get_secret_from_env(base_name: &str) -> Result<Option<String>, Error> {
>   fn get_secret_impl(env_variable: &str, credential_name: &str) -> Result<Option<String>, Error> {
>       if let Some(password) = get_secret_from_env(env_variable)? {
>           Ok(Some(password))
> -    } else if let Some(password) = get_credential(credential_name)? {
> -        str::from_utf8(&password)
> +    } else if let Some(blob) = get_credential(credential_name)? {
> +        str::from_utf8(&blob)
>               .map(|s| {
>                   if matches!(credential_name, CRED_PBS_REPOSITORY | CRED_PBS_FINGERPRINT) {
>                       s.trim_end()

since the conditional trimming is suggested to be done on the individual 
helpers (see comments on patch 1), this helper should also be renamed. 
E.g. it could be called get_secrets_blob() or raw_secret_as_string(), 
reflecting this.




      reply	other threads:[~2026-03-04  8:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23  9:37 [PATCH backup v3 0/3] fix #7054: client: remove trailing newlines from credentials Maximiliano Sandoval
2026-02-23  9:37 ` [PATCH backup v3 1/3] " Maximiliano Sandoval
2026-03-04  8:40   ` Christian Ebner
2026-02-23  9:37 ` [PATCH backup v3 2/3] docs: client: document further password constrains Maximiliano Sandoval
2026-03-04  8:44   ` Christian Ebner
2026-02-23  9:37 ` [PATCH backup v3 3/3] client: rename password to blob Maximiliano Sandoval
2026-03-04  8:49   ` 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=d0f2bcd2-e806-47bb-8579-bcdd67ed8fe6@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=m.sandoval@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 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