adium.1-4: 5e3d06a7: Reapply the other patch, too
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Thu Feb 18 12:10:22 EST 2010
-----------------------------------------------------------------
Revision: 5e3d06a76e0d7cb292d136b9ad842e88c31deba5
Ancestor: a554b059d556fb9fe7b3895dd6aca4ed2d53e421
Author: darkrain42 at pidgin.im
Date: 2010-02-18T17:09:18
Branch: im.pidgin.adium.1-4
URL: http://d.pidgin.im/viewmtn/revision/info/5e3d06a76e0d7cb292d136b9ad842e88c31deba5
Modified files:
libpurple/protocols/jabber/auth_cyrus.c
ChangeLog:
Reapply the other patch, too
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth_cyrus.c 9f25ac8e75700e56fc2bd1fd2df366f899700e14
+++ libpurple/protocols/jabber/auth_cyrus.c 6c6622ba6a337d6b7e2c926ecc106c6bcc3bf1fc
@@ -327,6 +327,23 @@ jabber_auth_start_cyrus(JabberStream *js
}
}
+ if (purple_strequal(js->current_mech, "DIGEST-MD5")) {
+ /* CYRUS-SASL's DIGEST-MD5 and Java's DIGEST-MD5 are mutually incompatible because of different interpretations of RFC2831.
+ * This means that if we are using SASL and connecting to a Java-based server such as OpenFire, we will receive an authentication
+ * failure if that server offers DIGEST-MD5 in such a way that SASL chooses it as the best mechanism for us.
+ *
+ * However, we implement our own DIGEST-MD5 for use when we're compiled without SASL support, and that implementation
+ * works correctly. Therefore, if SASL chooses DIGEST-MD5, we switch over to our own implementation.
+ * jabber_auth_handle_challenge() will take it from there.
+ *
+ * SASL would change state to SASL_OK after when handling the challenge; we do so immediately to avoid an error later.
+ */
+ js->sasl_mech = jabber_auth_get_digest_md5_mech();
+ js->sasl_state = SASL_OK;
+ sasl_dispose(&js->sasl);
+ js->sasl = NULL;
+ }
+
*reply = auth;
return JABBER_SASL_STATE_CONTINUE;
} else {
More information about the Commits
mailing list