From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A8DF61FF138 for ; Wed, 04 Mar 2026 09:48:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CBF513A88; Wed, 4 Mar 2026 09:49:43 +0100 (CET) Message-ID: Date: Wed, 4 Mar 2026 09:49:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH backup v3 3/3] client: rename password to blob To: Maximiliano Sandoval , pbs-devel@lists.proxmox.com References: <20260223093710.36009-1-m.sandoval@proxmox.com> <20260223093710.36009-4-m.sandoval@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20260223093710.36009-4-m.sandoval@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1772614124869 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.014 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.668 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.322 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 1.141 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: FD7UQT3XCFMDBAMSXA6BE2G4PHELQCSA X-Message-ID-Hash: FD7UQT3XCFMDBAMSXA6BE2G4PHELQCSA X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 2/23/26 10:37 AM, Maximiliano Sandoval wrote: > This is a Vec and not yet the password in its final form. > > Signed-off-by: Maximiliano Sandoval > --- > 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, Error> { > fn get_secret_impl(env_variable: &str, credential_name: &str) -> Result, 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.