comparison src/protocols/oscar/auth.c @ 10712:b41c48d890d8

[gaim-migrate @ 12306] sf patch #1153243, from Richard Laager Implement IRC Response #437, "Nick or channel is temporarily unavailable." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 21 Mar 2005 03:37:59 +0000
parents f7431a6ff0cb
children d087e928ffd1
comparison
equal deleted inserted replaced
10711:00483ba950bf 10712:b41c48d890d8
234 snacid = aim_cachesnac(sess, 0x0017, 0x0002, 0x0000, NULL, 0); 234 snacid = aim_cachesnac(sess, 0x0017, 0x0002, 0x0000, NULL, 0);
235 aim_putsnac(&fr->data, 0x0017, 0x0002, 0x0000, snacid); 235 aim_putsnac(&fr->data, 0x0017, 0x0002, 0x0000, snacid);
236 236
237 aim_tlvlist_add_raw(&tl, 0x0001, strlen(sn), sn); 237 aim_tlvlist_add_raw(&tl, 0x0001, strlen(sn), sn);
238 238
239 aim_encode_password_md5(password, key, digest); 239 /* Truncate ICQ passwords, if necessary */
240 if (isdigit(sn[0]) && (strlen(password) > MAXICQPASSLEN))
241 {
242 char truncated[MAXICQPASSLEN + 1];
243 strncpy(truncated, password, MAXICQPASSLEN);
244 truncated[MAXICQPASSLEN] = 0;
245 aim_encode_password_md5(truncated, key, digest);
246 }
247 else
248 {
249 aim_encode_password_md5(password, key, digest);
250 }
251
240 aim_tlvlist_add_raw(&tl, 0x0025, 16, digest); 252 aim_tlvlist_add_raw(&tl, 0x0025, 16, digest);
241 253
242 #ifndef USE_OLD_MD5 254 #ifndef USE_OLD_MD5
243 aim_tlvlist_add_noval(&tl, 0x004c); 255 aim_tlvlist_add_noval(&tl, 0x004c);
244 #endif 256 #endif