# HG changeset patch # User Nathan Walp # Date 1066193136 0 # Node ID 109817b028a6306032af59461d5996d372c16456 # Parent dc3918a729e851240f5bab2e801064e839500b8d [gaim-migrate @ 7844] a patch from Karsten Huneycutt (kph) to fix SASL authentication when the realm isn't the same as the jabber server committer: Tailor Script diff -r dc3918a729e8 -r 109817b028a6 src/protocols/jabber/auth.c --- a/src/protocols/jabber/auth.c Wed Oct 15 02:51:14 2003 +0000 +++ b/src/protocols/jabber/auth.c Wed Oct 15 04:45:36 2003 +0000 @@ -198,14 +198,14 @@ static unsigned char* generate_response_value(JabberID *jid, const char *passwd, const char *nonce, - const char *cnonce, const char *a2) + const char *cnonce, const char *a2, const char *realm) { md5_state_t ctx; md5_byte_t result[16]; char *x, *y, *a1, *ha1, *ha2, *kd, *z; - x = g_strdup_printf("%s:%s:%s", jid->node, jid->domain, passwd); + x = g_strdup_printf("%s:%s:%s", jid->node, realm, passwd); md5_init(&ctx); md5_append(&ctx, x, strlen(x)); md5_finish(&ctx, result); @@ -280,12 +280,12 @@ a2 = g_strdup_printf("AUTHENTICATE:xmpp/%s", realm); auth_resp = generate_response_value(js->user, - gaim_account_get_password(js->gc->account), nonce, cnonce, a2); + gaim_account_get_password(js->gc->account), nonce, cnonce, a2, realm); g_free(a2); a2 = g_strdup_printf(":xmpp/%s", realm); js->expected_rspauth = generate_response_value(js->user, - gaim_account_get_password(js->gc->account), nonce, cnonce, a2); + gaim_account_get_password(js->gc->account), nonce, cnonce, a2, realm); g_free(a2);