Skip to content

Commit dbc2244

Browse files
committed
make --ignorecase also ignore the case of usernames
1 parent 8f64684 commit dbc2244

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bin/rbw/commands.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,12 @@ impl DecryptedCipher {
612612
username: Some(found_username),
613613
..
614614
} => {
615-
if !found_username.contains(given_username) {
615+
if !((ignore_case
616+
&& found_username
617+
.to_lowercase()
618+
.contains(&given_username.to_lowercase()))
619+
|| found_username.contains(given_username))
620+
{
616621
return false;
617622
}
618623
}

0 commit comments

Comments
 (0)