feat(transport-smtp): Support to SASL draft login challenge (#911)
This commit is contained in:
@@ -98,11 +98,13 @@ impl Mechanism {
|
|||||||
let decoded_challenge = challenge
|
let decoded_challenge = challenge
|
||||||
.ok_or_else(|| error::client("This mechanism does expect a challenge"))?;
|
.ok_or_else(|| error::client("This mechanism does expect a challenge"))?;
|
||||||
|
|
||||||
if ["User Name", "Username:", "Username"].contains(&decoded_challenge) {
|
if ["User Name", "Username:", "Username", "User Name\0"]
|
||||||
|
.contains(&decoded_challenge)
|
||||||
|
{
|
||||||
return Ok(credentials.authentication_identity.clone());
|
return Ok(credentials.authentication_identity.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ["Password", "Password:"].contains(&decoded_challenge) {
|
if ["Password", "Password:", "Password\0"].contains(&decoded_challenge) {
|
||||||
return Ok(credentials.secret.clone());
|
return Ok(credentials.secret.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user