respect rfc6120 §6.5 properly in sasl_error
Any unknown condition should be considered as a <not-authorized/> one.
This commit is contained in:
parent
9d57e1a63b
commit
f8c76ac1e8
1 changed files with 10 additions and 0 deletions
|
|
@ -70,6 +70,16 @@ impl FromElement for SaslError {
|
||||||
else if element.has_child("temporary-auth-failure", ns::SASL) {
|
else if element.has_child("temporary-auth-failure", ns::SASL) {
|
||||||
err.condition = Condition::TemporaryAuthFailure;
|
err.condition = Condition::TemporaryAuthFailure;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* RFC 6120 section 6.5:
|
||||||
|
*
|
||||||
|
* However, because additional error conditions might be defined in
|
||||||
|
* the future, if an entity receives a SASL error condition that it
|
||||||
|
* does not understand then it MUST treat the unknown condition as
|
||||||
|
* a generic authentication failure, i.e., as equivalent to
|
||||||
|
* <not-authorized/> (Section 6.5.10). */
|
||||||
|
err.condition = Condition::NotAuthorized;
|
||||||
|
}
|
||||||
Ok(err)
|
Ok(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue