# HG changeset patch # User Evan Schoenberg # Date 1211334543 0 # Node ID 9d331ad0a8dce7c74c0928b830d32e246b667972 # Parent e4f5a65d9a774b179ee86a01dc91ab37e99788cc Skip the X-GOOGLE-TOKEN mech (given us by Google Talk when connecting with SASL support), as we don't support it and its presence in the mechs list makes us think we have another fallback left if we fail PLAIN, which can distort the presented error message. diff -r e4f5a65d9a77 -r 9d331ad0a8dc libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Wed May 21 01:46:01 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Wed May 21 01:49:03 2008 +0000 @@ -499,6 +499,13 @@ { char *mech_name = xmlnode_get_data(mechnode); #ifdef HAVE_CYRUS_SASL + /* Don't include Google Talk's X-GOOGLE-TOKEN mechanism, as we will not + * support it and including it gives a false fall-back to other mechs offerred, + * leading to incorrect error handling. + */ + if (mech_name && !strcmp(mech_name, "X-GOOGLE-TOKEN")) + continue; + g_string_append(js->sasl_mechs, mech_name); g_string_append_c(js->sasl_mechs, ' '); #else