mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
auth: add work-around for xmpp-parsers pickyness
This commit is contained in:
parent
ce039d767e
commit
11cc7f183a
1 changed files with 3 additions and 1 deletions
|
@ -92,9 +92,11 @@ impl<S: AsyncRead + AsyncWrite + 'static> ClientAuth<S> {
|
||||||
Box::new(ok(stream))
|
Box::new(ok(stream))
|
||||||
} else if let Ok(failure) = Failure::try_from(stanza.clone()) {
|
} else if let Ok(failure) = Failure::try_from(stanza.clone()) {
|
||||||
Box::new(err(Error::Auth(AuthError::Fail(failure.defined_condition))))
|
Box::new(err(Error::Auth(AuthError::Fail(failure.defined_condition))))
|
||||||
|
} else if stanza.name() == "failure" {
|
||||||
|
// Workaround for https://gitlab.com/xmpp-rs/xmpp-parsers/merge_requests/1
|
||||||
|
Box::new(err(Error::Auth(AuthError::Sasl("failure".to_string()))))
|
||||||
} else {
|
} else {
|
||||||
// ignore and loop
|
// ignore and loop
|
||||||
println!("Ignore: {:?}", stanza);
|
|
||||||
Self::handle_challenge(stream, mechanism)
|
Self::handle_challenge(stream, mechanism)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue