Skip to content

Commit

Permalink
v0.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Jul 4, 2024
1 parent 6f7f9d5 commit 176a3a9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions crates/imap/src/op/authenticate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,10 @@ pub fn decode_challenge_plain(challenge: &[u8]) -> Result<Credentials<String>, &
let mut arg_num = 0;
for &ch in challenge {
if ch != 0 {
match arg_num.cmp(&2) {
std::cmp::Ordering::Less => {
username.push(ch);
}
std::cmp::Ordering::Equal => {
secret.push(ch);
}
std::cmp::Ordering::Greater => (),
if arg_num == 1 {
username.push(ch);
} else if arg_num == 2 {
secret.push(ch);
}
} else {
arg_num += 1;
Expand Down

0 comments on commit 176a3a9

Please sign in to comment.