comparison src/protocols/oscar/im.c @ 10693:f7431a6ff0cb

[gaim-migrate @ 12245] Print the screen name in an oscar debug message, and use the non-sucky authentication scheme for ICQ (MD5 instead of XOR). ...as she looked up into my eyes, her vision borrowed mine... committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 14 Mar 2005 03:27:01 +0000
parents de34037a02c7
children ecc0f22db510
comparison
equal deleted inserted replaced
10692:533060d9a2c6 10693:f7431a6ff0cb
1306 * Start by building the multipart structures, then pick the first 1306 * Start by building the multipart structures, then pick the first
1307 * human-readable section and stuff it into args->msg so no one gets 1307 * human-readable section and stuff it into args->msg so no one gets
1308 * suspicious. 1308 * suspicious.
1309 * 1309 *
1310 */ 1310 */
1311 static int incomingim_ch1_parsemsgs(aim_session_t *sess, fu8_t *data, int len, struct aim_incomingim_ch1_args *args) 1311 static int incomingim_ch1_parsemsgs(aim_session_t *sess, aim_userinfo_t *userinfo, fu8_t *data, int len, struct aim_incomingim_ch1_args *args)
1312 { 1312 {
1313 /* Should this be ASCII -> UNICODE -> Custom */ 1313 /* Should this be ASCII -> UNICODE -> Custom */
1314 static const fu16_t charsetpri[] = { 1314 static const fu16_t charsetpri[] = {
1315 AIM_CHARSET_ASCII, /* ASCII first */ 1315 AIM_CHARSET_ASCII, /* ASCII first */
1316 AIM_CHARSET_CUSTOM, /* then ISO-8859-1 */ 1316 AIM_CHARSET_CUSTOM, /* then ISO-8859-1 */
1332 1332
1333 /* Message string length, including character set info. */ 1333 /* Message string length, including character set info. */
1334 msglen = aimbs_get16(&mbs); 1334 msglen = aimbs_get16(&mbs);
1335 if (msglen > aim_bstream_empty(&mbs)) 1335 if (msglen > aim_bstream_empty(&mbs))
1336 { 1336 {
1337 faimdprintf(sess, 0, "Received an IM containing an invalid message part from %s. They are probably trying to do something malicious."); 1337 faimdprintf(sess, 0, "Received an IM containing an invalid message part from %s. They are probably trying to do something malicious.", userinfo->sn);
1338 break; 1338 break;
1339 } 1339 }
1340 1340
1341 /* Character set info */ 1341 /* Character set info */
1342 flag1 = aimbs_get16(&mbs); 1342 flag1 = aimbs_get16(&mbs);
1472 1472
1473 /* 1473 /*
1474 * The rest of the TLV contains one or more message 1474 * The rest of the TLV contains one or more message
1475 * blocks... 1475 * blocks...
1476 */ 1476 */
1477 incomingim_ch1_parsemsgs(sess, bs->data + bs->offset /* XXX evil!!! */, length - 2 - 2 - args.featureslen, &args); 1477 incomingim_ch1_parsemsgs(sess, userinfo, bs->data + bs->offset /* XXX evil!!! */, length - 2 - 2 - args.featureslen, &args);
1478 1478
1479 } else if (type == 0x0003) { /* Server Ack Requested */ 1479 } else if (type == 0x0003) { /* Server Ack Requested */
1480 1480
1481 args.icbmflags |= AIM_IMFLAGS_ACK; 1481 args.icbmflags |= AIM_IMFLAGS_ACK;
1482 1482