changeset 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 533060d9a2c6
children 06f68443e6e5
files src/protocols/oscar/auth.c src/protocols/oscar/im.c
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/auth.c	Mon Mar 14 01:55:50 2005 +0000
+++ b/src/protocols/oscar/auth.c	Mon Mar 14 03:27:01 2005 +0000
@@ -13,6 +13,7 @@
 
 #include <ctype.h>
 
+#ifdef USE_XOR_FOR_ICQ
 /**
  * Encode a password using old XOR method
  *
@@ -52,6 +53,7 @@
 
 	return 0;
 }
+#endif
 
 #ifdef USE_OLD_MD5
 static int aim_encode_password_md5(const char *password, const char *key, fu8_t *digest)
@@ -131,6 +133,7 @@
 	return 0;
 }
 
+#ifdef USE_XOR_FOR_ICQ
 /*
  * Part two of the ICQ hack.  Note the ignoring of the key.
  */
@@ -178,6 +181,7 @@
 
 	return 0;
 }
+#endif
 
 /*
  * Subtype 0x0002
@@ -218,9 +222,11 @@
 	if (!ci || !sn || !password)
 		return -EINVAL;
 
+#ifdef USE_XOR_FOR_ICQ
 	/* If we're signing on an ICQ account then use the older, XOR login method */
 	if (isdigit(sn[0]))
 		return goddamnicq2(sess, conn, sn, password, ci);
+#endif
 
 	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152)))
 		return -ENOMEM;
@@ -396,6 +402,7 @@
 	return ret;
 }
 
+#ifdef USE_XOR_FOR_ICQ
 /*
  * Subtype 0x0007 (kind of) - Send a fake type 0x0007 SNAC to the client
  *
@@ -443,6 +450,7 @@
 
 	return 0;
 }
+#endif
 
 /*
  * Subtype 0x0006
@@ -463,8 +471,10 @@
 	if (!sess || !conn || !sn)
 		return -EINVAL;
 
+#ifdef USE_XOR_FOR_ICQ
 	if (isdigit(sn[0]))
 		return goddamnicq(sess, conn, sn);
+#endif
 
 	aim_sendflapver(sess, conn);
 
--- a/src/protocols/oscar/im.c	Mon Mar 14 01:55:50 2005 +0000
+++ b/src/protocols/oscar/im.c	Mon Mar 14 03:27:01 2005 +0000
@@ -1308,7 +1308,7 @@
  * suspicious.
  *
  */
-static int incomingim_ch1_parsemsgs(aim_session_t *sess, fu8_t *data, int len, struct aim_incomingim_ch1_args *args)
+static int incomingim_ch1_parsemsgs(aim_session_t *sess, aim_userinfo_t *userinfo, fu8_t *data, int len, struct aim_incomingim_ch1_args *args)
 {
 	/* Should this be ASCII -> UNICODE -> Custom */
 	static const fu16_t charsetpri[] = {
@@ -1334,7 +1334,7 @@
 		msglen = aimbs_get16(&mbs);
 		if (msglen > aim_bstream_empty(&mbs))
 		{
-			faimdprintf(sess, 0, "Received an IM containing an invalid message part from %s.  They are probably trying to do something malicious.");
+			faimdprintf(sess, 0, "Received an IM containing an invalid message part from %s.  They are probably trying to do something malicious.", userinfo->sn);
 			break;
 		}
 
@@ -1474,7 +1474,7 @@
 			 * The rest of the TLV contains one or more message
 			 * blocks...
 			 */
-			incomingim_ch1_parsemsgs(sess, bs->data + bs->offset /* XXX evil!!! */, length - 2 - 2 - args.featureslen, &args);
+			incomingim_ch1_parsemsgs(sess, userinfo, bs->data + bs->offset /* XXX evil!!! */, length - 2 - 2 - args.featureslen, &args);
 
 		} else if (type == 0x0003) { /* Server Ack Requested */