diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-01 18:15:46 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-01 18:15:46 +0200 |
commit | 88591fd3b95ab21ca016204b49fb80d6d6cdd541 (patch) | |
tree | 2f674a8a4f4781c437b66c0186d2089e9a81ec75 /protocols/jabber/io.c | |
parent | 0e2d97f6b3bcffd5637eafa9a687e42a7c134f57 (diff) |
Better fix for servers that report to comply with XMPP 1.0 but don't offer
SASL authentication options. Previous fix tried to do IQ authentication
even after successful SASL authentications.
Diffstat (limited to 'protocols/jabber/io.c')
-rw-r--r-- | protocols/jabber/io.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 3dbc6faa..189320d9 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -304,15 +304,14 @@ static xt_status jabber_pkt_features( struct xt_node *node, gpointer data ) if( sasl_pkt_mechanisms( c, data ) == XT_ABORT ) return XT_ABORT; } - else + /* If the server *SEEMS* to support SASL authentication but doesn't + support it after all, we should try to do authentication the + other way. jabber.com doesn't seem to do SASL while it pretends + to be XMPP 1.0 compliant! */ + else if( !( jd->flags & JFLAG_AUTHENTICATED ) && sasl_supported( gc ) ) { - /* If the server *SEEMS* to support SASL authentication but - doesn't support it after all, we should try to do - authentication the other way. jabber.com doesn't seem to - do SASL while it pretends to be XMPP 1.0 compliant! */ - if( sasl_supported( gc ) ) - if( !jabber_start_iq_auth( gc ) ) - return XT_ABORT; + if( !jabber_start_iq_auth( gc ) ) + return XT_ABORT; } if( ( c = xt_find_node( node->children, "bind" ) ) ) |