From 55f3deb01cfd87b6dc531f1cc722e6df24dbad77 Mon Sep 17 00:00:00 2001 From: rezky_nightky Date: Tue, 2 Dec 2025 00:00:19 +0700 Subject: [PATCH] fix: address typos findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rename temporary 'fpr' variables to clearer fingerprint names in crypto helpers and tests - correct word list entries (branch, command, manager, performed, raccoon, usable) to proper spellings - fix README wording so “available” is spelled correctly Author: rezky_nightky Timestamp: 2025-12-01T17:00:19Z Repository: ripasso Branch: master Signing: GPG (989AF9F0) Performance: 5 files, +17/-15 lines --- cursive/README.md | 4 +++- src/crypto.rs | 12 ++++++------ src/tests/pass.rs | 2 +- src/tests/test_helpers.rs | 2 +- src/words.rs | 12 ++++++------ 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cursive/README.md b/cursive/README.md index 01445588..ce843820 100644 --- a/cursive/README.md +++ b/cursive/README.md @@ -11,12 +11,14 @@ A curses password manager written in Rust. TUI interface based on [cursive](https://github.com/gyscos/Cursive) +This requires the ncurses libraries to be available on your system. + #### Install ``` cargo install ripasso-cursive ``` -Or get it from your package system if it's availible. +Or get it from your package system if it's available. ## Translations diff --git a/src/crypto.rs b/src/crypto.rs index 0eb29597..d51a938f 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -316,14 +316,14 @@ impl Crypto for GpgMe { let mut sig_sum = None; for (i, s) in result.signatures().enumerate() { - let fpr = s + let fingerprint_hex = s .fingerprint() .map_err(|e| InfrastructureError(format!("{e:?}")))?; - let fpr = - <[u8; 20]>::from_hex(fpr).map_err(|e| InfrastructureError(format!("{e:?}")))?; + let fingerprint_bytes = <[u8; 20]>::from_hex(fingerprint_hex) + .map_err(|e| InfrastructureError(format!("{e:?}")))?; - if !valid_signing_keys.contains(&fpr) { + if !valid_signing_keys.contains(&fingerprint_bytes) { return Err(VerificationError::SignatureFromWrongRecipient); } if i == 0 { @@ -494,8 +494,8 @@ fn find( let recipient = recipient.as_ref().ok_or(Error::Generic("No recipient"))?; match recipient { - KeyHandle::Fingerprint(fpr) => { - match fpr { + KeyHandle::Fingerprint(fingerprint) => { + match fingerprint { Fingerprint::V6(_v6) => { return Err(Error::Generic("v6 keys not supported yet")); } diff --git a/src/tests/pass.rs b/src/tests/pass.rs index e8fca627..ad04931b 100644 --- a/src/tests/pass.rs +++ b/src/tests/pass.rs @@ -1672,7 +1672,7 @@ fn test_verify_git_signature() -> Result<()> { assert_eq!( Error::Generic( - "the commit wasn\'t signed by one of the keys specified in the environmental variable PASSWORD_STORE_SIGNING_KEY" + "the commit wasn't signed by one of the keys specified in the environmental variable PASSWORD_STORE_SIGNING_KEY" ), result.err().unwrap() ); diff --git a/src/tests/test_helpers.rs b/src/tests/test_helpers.rs index d33a3009..3b4863aa 100644 --- a/src/tests/test_helpers.rs +++ b/src/tests/test_helpers.rs @@ -366,7 +366,7 @@ impl DecryptionHelper for &mut KeyLister { pkesks .iter() .map(|p| match p.recipient().clone().unwrap() { - KeyHandle::Fingerprint(fpr) => Ok(fpr.into()), + KeyHandle::Fingerprint(fingerprint) => Ok(fingerprint.into()), KeyHandle::KeyID(key_id) => Ok(key_id), }) .collect::, anyhow::Error>>()?, diff --git a/src/words.rs b/src/words.rs index a6c18126..17d2d01f 100644 --- a/src/words.rs +++ b/src/words.rs @@ -722,7 +722,7 @@ const WORDS: &[&str] = &[ "browse", "browsing", "bruising", - "brunch", + "branch", "brunette", "brunt", "brush", @@ -1198,7 +1198,7 @@ const WORDS: &[&str] = &[ "coming", "comma", "commence", - "commend", + "command", "comment", "commerce", "commode", @@ -3844,7 +3844,7 @@ const WORDS: &[&str] = &[ "mandate", "mandatory", "mandolin", - "manger", + "manager", "mangle", "mango", "mangy", @@ -4811,7 +4811,7 @@ const WORDS: &[&str] = &[ "preface", "prefix", "preflight", - "preformed", + "performed", "pregame", "pregnancy", "pregnant", @@ -5059,7 +5059,7 @@ const WORDS: &[&str] = &[ "racing", "racism", "rack", - "racoon", + "raccoon", "radar", "radial", "radiance", @@ -7441,7 +7441,7 @@ const WORDS: &[&str] = &[ "urology", "usable", "usage", - "useable", + "usable", "used", "uselessly", "user",