comparison libpurple/protocols/jabber/auth.c @ 23077:9d331ad0a8dc

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.
author Evan Schoenberg <evan.s@dreskin.net>
date Wed, 21 May 2008 01:49:03 +0000
parents 42dfa1139b5c
children 0ae9c9befa63
comparison
equal deleted inserted replaced
23076:e4f5a65d9a77 23077:9d331ad0a8dc
497 for(mechnode = xmlnode_get_child(mechs, "mechanism"); mechnode; 497 for(mechnode = xmlnode_get_child(mechs, "mechanism"); mechnode;
498 mechnode = xmlnode_get_next_twin(mechnode)) 498 mechnode = xmlnode_get_next_twin(mechnode))
499 { 499 {
500 char *mech_name = xmlnode_get_data(mechnode); 500 char *mech_name = xmlnode_get_data(mechnode);
501 #ifdef HAVE_CYRUS_SASL 501 #ifdef HAVE_CYRUS_SASL
502 /* Don't include Google Talk's X-GOOGLE-TOKEN mechanism, as we will not
503 * support it and including it gives a false fall-back to other mechs offerred,
504 * leading to incorrect error handling.
505 */
506 if (mech_name && !strcmp(mech_name, "X-GOOGLE-TOKEN"))
507 continue;
508
502 g_string_append(js->sasl_mechs, mech_name); 509 g_string_append(js->sasl_mechs, mech_name);
503 g_string_append_c(js->sasl_mechs, ' '); 510 g_string_append_c(js->sasl_mechs, ' ');
504 #else 511 #else
505 if(mech_name && !strcmp(mech_name, "DIGEST-MD5")) 512 if(mech_name && !strcmp(mech_name, "DIGEST-MD5"))
506 digest_md5 = TRUE; 513 digest_md5 = TRUE;