[CC-ed the BTS since this might be related, I hope this is correct]

Hi,

it seems to be a gaim problem:
https://sourceforge.net/tracker/index.php?func=detail&aid=1166027&group_id=235&atid=100235

I replaced debian/patches/icq-auth.patch with the attached patch, and now it works for me again.

Sorry for the noise,
Martin
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/auth.c,v
retrieving revision 1.21.2.3
retrieving revision 1.21.2.4
diff -u -r1.21.2.3 -r1.21.2.4
--- src/protocols/oscar/auth.c  2005/03/14 03:20:19     1.21.2.3
+++ src/protocols/oscar/auth.c  2005/03/21 02:55:37     1.21.2.4
@@ -219,7 +219,7 @@
                return -EINVAL;
 
        /* If we're signing on an ICQ account then use the older, XOR login 
method */
+       if (isdigit(sn[0]))
-       if (0 && isdigit(sn[0]))
                return goddamnicq2(sess, conn, sn, password, ci);
 
        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152)))
@@ -230,7 +230,19 @@
 
        aim_tlvlist_add_raw(&tl, 0x0001, strlen(sn), sn);
 
-       aim_encode_password_md5(password, key, digest);
+       /* Truncated ICQ passwords, if necessary */
+       if (isdigit(sn[0]) && (strlen(password) > MAXICQPASSLEN))
+       {
+               char truncated[MAXICQPASSLEN + 1];
+               strncpy(truncated, password, MAXICQPASSLEN);
+               truncated[MAXICQPASSLEN] = 0;
+               aim_encode_password_md5(truncated, key, digest);
+       }
+       else
+       {
+               aim_encode_password_md5(password, key, digest);
+       }
+
        aim_tlvlist_add_raw(&tl, 0x0025, 16, digest);
 
 #ifndef USE_OLD_MD5
@@ -463,7 +463,7 @@
        if (!sess || !conn || !sn)
                return -EINVAL;
 
+       if (isdigit(sn[0]))
-       if (0 && isdigit(sn[0]))
                return goddamnicq(sess, conn, sn);
 
        aim_sendflapver(sess, conn);

Reply via email to