Mercurial > pidgin.yaz
changeset 7267:109817b028a6
[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 <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 15 Oct 2003 04:45:36 +0000 |
parents | dc3918a729e8 |
children | e588fea95786 |
files | src/protocols/jabber/auth.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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);