# HG changeset patch # User Paul Aurich # Date 1244228782 0 # Node ID 9df57b1a356998d198b196685de628d0f7d39a65 # Parent 804141095de5faa5d5209998559824feab5780eb# Parent 1fd829110a6d1ca078ca48c1c8e4b4568ebd23a0 merge of '75a466dd96590961d154c6e5d131d85bcae642c6' and '920617286db82f86def448f0e2233ade2f89a0a9' diff -r 804141095de5 -r 9df57b1a3569 COPYRIGHT --- a/COPYRIGHT Fri Jun 05 08:23:18 2009 +0000 +++ b/COPYRIGHT Fri Jun 05 19:06:22 2009 +0000 @@ -452,6 +452,7 @@ Mark Tiefenbruck Andrew Tinney Jeffery To +Krzysztof Tobola (kreez) Warren Togami Stu Tomlinson Bill Tompkins diff -r 804141095de5 -r 9df57b1a3569 ChangeLog --- a/ChangeLog Fri Jun 05 08:23:18 2009 +0000 +++ b/ChangeLog Fri Jun 05 19:06:22 2009 +0000 @@ -18,6 +18,8 @@ from you on MSN. * DNS servers are re-read when DNS queries fail in case the system has moved to a new network and the old servers are not accessible. + * Gadu-Gadu accounts can specify a server to which to connect. + (Krzysztof "kreez" Tobola) XMPP: * Voice & Video support with Jingle (XEP-0166, 0167, 0176, & 0177), voice @@ -52,6 +54,9 @@ chat to avoid getting too many fetch requests). * Fix an issue with Jabber (pre-XMPP) servers and the user's preference to require SSL not being respected. + * Fix an issue where Cyrus SASL DIGEST MD5 authentication might fail if + the username, password, or realm (the JID domain) contain non-ASCII + characters. Yahoo: * P2P file transfers. (Sulabh Mahajan) diff -r 804141095de5 -r 9df57b1a3569 libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Fri Jun 05 08:23:18 2009 +0000 +++ b/libpurple/protocols/jabber/auth.c Fri Jun 05 19:06:22 2009 +0000 @@ -989,7 +989,20 @@ response = xmlnode_new("response"); xmlnode_set_namespace(response, "urn:ietf:params:xml:ns:xmpp-sasl"); if (clen > 0) { - enc_out = purple_base64_encode((unsigned char*)c_out, clen); + /* 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. + * 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=")) + enc_out = purple_base64_encode((unsigned char*)c_out, clen); + else { + char *tmp = g_strdup_printf("%s,charset=utf-8", c_out); + enc_out = purple_base64_encode((unsigned char*)c_out, clen + 14); + g_free(tmp); + } + xmlnode_insert_data(response, enc_out, -1); g_free(enc_out); }