mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-10 20:45:48 +08:00
v0.8.4
This commit is contained in:
parent
6f7f9d5fed
commit
176a3a90ae
1 changed files with 4 additions and 8 deletions
|
@ -233,14 +233,10 @@ pub fn decode_challenge_plain(challenge: &[u8]) -> Result<Credentials<String>, &
|
||||||
let mut arg_num = 0;
|
let mut arg_num = 0;
|
||||||
for &ch in challenge {
|
for &ch in challenge {
|
||||||
if ch != 0 {
|
if ch != 0 {
|
||||||
match arg_num.cmp(&2) {
|
if arg_num == 1 {
|
||||||
std::cmp::Ordering::Less => {
|
username.push(ch);
|
||||||
username.push(ch);
|
} else if arg_num == 2 {
|
||||||
}
|
secret.push(ch);
|
||||||
std::cmp::Ordering::Equal => {
|
|
||||||
secret.push(ch);
|
|
||||||
}
|
|
||||||
std::cmp::Ordering::Greater => (),
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
arg_num += 1;
|
arg_num += 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue