Revision: 16658
Author: datallah
Date: 2006-08-06 16:47:34 -0700 (Sun, 06 Aug 2006)
ViewCVS: http://svn.sourceforge.net/gaim/?rev=16658&view=rev
Log Message:
-----------
It has been too long since I did something productive here. Fix logging into yahoo with a password containing non-ascii characters. This fixes bug #1534796.
Modified Paths:
--------------
trunk/src/protocols/yahoo/yahoo.c
Modified: trunk/src/protocols/yahoo/yahoo.c
===================================================================
--- trunk/src/protocols/yahoo/yahoo.c 2006-08-06 21:03:10 UTC (rev 16657)
+++ trunk/src/protocols/yahoo/yahoo.c 2006-08-06 23:47:34 UTC (rev 16658)
@@ -1241,6 +1241,7 @@
GaimAccount *account = gaim_connection_get_account(gc);
const char *name = gaim_normalize(account, gaim_account_get_username(account));
const char *pass = gaim_connection_get_password(gc);
+ char *enc_pass;
struct yahoo_data *yd = gc->proto_data;
GaimCipher *md5_cipher;
@@ -1472,14 +1473,20 @@
magic_key_char[3] = (updated_key >> 24) & 0xff;
}
+ enc_pass = yahoo_string_encode(gc, pass, NULL);
+
/* Get password and crypt hashes as per usual. */
gaim_cipher_context_reset(md5_ctx, NULL);
- gaim_cipher_context_append(md5_ctx, (const guchar *)pass, strlen(pass));
+ gaim_cipher_context_append(md5_ctx, (const guchar *)enc_pass, strlen(enc_pass));
gaim_cipher_context_digest(md5_ctx, sizeof(md5_digest),
md5_digest, NULL);
to_y64(password_hash, md5_digest, 16);
- crypt_result = yahoo_crypt(pass, "$1$_2S43d5f$");
+ crypt_result = yahoo_crypt(enc_pass, "$1$_2S43d5f$");
+
+ g_free(enc_pass);
+ enc_pass = NULL;
+
gaim_cipher_context_reset(md5_ctx, NULL);
gaim_cipher_context_append(md5_ctx, (const guchar *)crypt_result, strlen(crypt_result));
gaim_cipher_context_digest(md5_ctx, sizeof(md5_digest),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|