Skip to content

Commit

Permalink
make --ignorecase also ignore the case of usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Jun 20, 2024
1 parent 8f64684 commit dbc2244
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bin/rbw/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,12 @@ impl DecryptedCipher {
username: Some(found_username),
..
} => {
if !found_username.contains(given_username) {
if !((ignore_case
&& found_username
.to_lowercase()
.contains(&given_username.to_lowercase()))
|| found_username.contains(given_username))
{
return false;
}
}
Expand Down

0 comments on commit dbc2244

Please sign in to comment.