Mercurial > pidgin
changeset 27156:ad87bc575586
merge of '849a753dc5505c801cd053591778ddd340db6337'
and 'aec1adb73ee28586c6f762aabd481c41158b4d9f'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 23 Jun 2009 06:45:31 +0000 |
parents | 4ea129edc62c (diff) 8cb0f676c70d (current diff) |
children | 4a62072ea833 8f405df1652d |
files | |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c Tue Jun 23 05:53:14 2009 +0000 +++ b/libpurple/protocols/jabber/auth.c Tue Jun 23 06:45:31 2009 +0000 @@ -990,12 +990,16 @@ xmlnode_set_namespace(response, "urn:ietf:params:xml:ns:xmpp-sasl"); if (clen > 0) { /* Cyrus SASL 2.1.22 appears to contain code to add the charset - * to the response but there is no possibility it will be executed. + * to the response for DIGEST-MD5 but there is no possibility + * it will be executed. + * * My reading of the digestmd5 plugin indicates the username and * realm are always encoded in UTF-8 (they seem to be the values * we pass in), so we need to ensure charset=utf-8 is set. */ - if (strstr(c_out, ",charset=")) + if (!js->current_mech || !g_str_equal(js->current_mech, "DIGEST-MD5") || + strstr(c_out, ",charset=")) + /* If we're not using DIGEST-MD5 or Cyrus SASL is fixed */ enc_out = purple_base64_encode((unsigned char*)c_out, clen); else { char *tmp = g_strdup_printf("%s,charset=utf-8", c_out);