pidgin: 054ca20d: disapproval of revision '84a23ef59e6a3bc...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Wed Jun 3 18:15:40 EDT 2009
-----------------------------------------------------------------
Revision: 054ca20dffd917fc57972d8756d9c15ead22fd85
Ancestor: 84a23ef59e6a3bc88834f0948c67516f0a39234b
Author: darkrain42 at pidgin.im
Date: 2009-06-03T19:34:26
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/054ca20dffd917fc57972d8756d9c15ead22fd85
Modified files:
ChangeLog libpurple/protocols/jabber/auth.c
ChangeLog:
disapproval of revision '84a23ef59e6a3bc88834f0948c67516f0a39234b'
Conversation in devel at c.p.i leads to deryni saying:
Ok, if we send charset=utf-8 then we need to have sent a utf8 username and realm in digest-response but need to have used iso8859-1 versions of them when calculating response-value (if they are valid iso8859-1). I think.
which is what the code was doing before.
-------------- next part --------------
============================================================
--- ChangeLog 7833b94f9c7e08df05bc6c66b8f3ea9fe69c02d3
+++ ChangeLog 996520af674f2b26da61e7d6e00c79f7cafee04f
@@ -50,8 +50,6 @@ version 2.6.0 (??/??/2009):
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.
- * When using non-Cyrus SASL DIGEST-MD5 authentication, only specify the
- charset as UTF-8 if the username/password weren't converted to ISO-8859-1.
Yahoo:
* P2P file transfers. (Sulabh Mahajan)
============================================================
--- libpurple/protocols/jabber/auth.c 11a5988adda821024852c3d4301d6178d2bd7e5a
+++ libpurple/protocols/jabber/auth.c 4846e5134fd09bde6ad21cd0b75b64693e90e5ea
@@ -784,29 +784,22 @@ generate_response_value(JabberID *jid, c
static char *
generate_response_value(JabberID *jid, const char *passwd, const char *nonce,
- const char *cnonce, const char *a2, const char *realm,
- gboolean *converted)
+ const char *cnonce, const char *a2, const char *realm)
{
PurpleCipher *cipher;
PurpleCipherContext *context;
guchar result[16];
size_t a1len;
- gchar *a1, *convnode=NULL, *convpasswd = NULL, *ha1, *ha2, *kd, *x, *z;
- if (converted)
- *converted = TRUE;
+ gchar *a1, *convnode=NULL, *convpasswd = NULL, *ha1, *ha2, *kd, *x, *z;
if((convnode = g_convert(jid->node, -1, "iso-8859-1", "utf-8",
NULL, NULL, NULL)) == NULL) {
convnode = g_strdup(jid->node);
- if (converted)
- *converted = FALSE;
}
if(passwd && ((convpasswd = g_convert(passwd, -1, "iso-8859-1",
"utf-8", NULL, NULL, NULL)) == NULL)) {
convpasswd = g_strdup(passwd);
- if (converted)
- *converted = FALSE;
}
cipher = purple_ciphers_find_cipher("md5");
@@ -921,19 +914,18 @@ jabber_auth_handle_challenge(JabberStrea
char *auth_resp;
char *buf;
char *cnonce;
- gboolean converted_to_iso8859;
cnonce = g_strdup_printf("%x%u%x", g_random_int(), (int)time(NULL),
g_random_int());
a2 = g_strdup_printf("AUTHENTICATE:xmpp/%s", realm);
auth_resp = generate_response_value(js->user,
- purple_connection_get_password(js->gc), nonce, cnonce, a2, realm, &converted_to_iso8859);
+ purple_connection_get_password(js->gc), nonce, cnonce, a2, realm);
g_free(a2);
a2 = g_strdup_printf(":xmpp/%s", realm);
js->expected_rspauth = generate_response_value(js->user,
- purple_connection_get_password(js->gc), nonce, cnonce, a2, realm, &converted_to_iso8859);
+ purple_connection_get_password(js->gc), nonce, cnonce, a2, realm);
g_free(a2);
g_string_append_printf(response, "username=\"%s\"", js->user->node);
@@ -944,8 +936,7 @@ jabber_auth_handle_challenge(JabberStrea
g_string_append_printf(response, ",qop=auth");
g_string_append_printf(response, ",digest-uri=\"xmpp/%s\"", realm);
g_string_append_printf(response, ",response=%s", auth_resp);
- if (!converted_to_iso8859)
- g_string_append_printf(response, ",charset=utf-8");
+ g_string_append_printf(response, ",charset=utf-8");
g_free(auth_resp);
g_free(cnonce);
More information about the Commits
mailing list