From 8b4a4235beb8d22cbd325e47ac09e779a4ee1ec8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:21:59 +0000 Subject: [PATCH 1/2] Initial plan From 209744f2c3ab3fd329c3345bfc8efd5a36537bda Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:28:18 +0000 Subject: [PATCH 2/2] refactor: remove unnecessary verify_string_with_params wrapper Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com> --- dwctl/src/auth/password.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dwctl/src/auth/password.rs b/dwctl/src/auth/password.rs index bf5b1bec8..1ecbd4dde 100644 --- a/dwctl/src/auth/password.rs +++ b/dwctl/src/auth/password.rs @@ -64,9 +64,8 @@ pub fn hash_string(input: &str) -> Result { /// Verify a string against a hash. /// -/// Note: Verification uses the parameters embedded in the hash itself, -/// so the params argument is ignored. It's included for API consistency. -pub fn verify_string_with_params(input: &str, hash: &str, _params: Option) -> Result { +/// Note: Verification uses the parameters embedded in the hash itself. +pub fn verify_string(input: &str, hash: &str) -> Result { let parsed_hash = PasswordHash::new(hash).map_err(|e| Error::Internal { operation: format!("parse hash: {e}"), })?; @@ -76,11 +75,6 @@ pub fn verify_string_with_params(input: &str, hash: &str, _params: Option Result { - verify_string_with_params(input, hash, None) -} - /// Generate a secure random token for password reset pub fn generate_reset_token() -> String { // Generate 32 bytes (256 bits) of cryptographically secure random data