diff src/protocols/oscar/aim.h @ 4293:79d871c11eb9

[gaim-migrate @ 4546] This changes to authorization cookie from a fixed length of 0x0100 bytes to a dynamic length. The cookie AOL sends is always 0x0100 bytes, but there was a bug report saying, "I found that Gaim doesn't work with iserverd because it uses hardcoded authorization cookie length. Why don't you use TLV length value as auth cookie length ? ICQ2k+ and winaim works without problems with 64 byte cookies... AOL can just change cookie len and gaim will became useless..." I don't know about useless... but he does have a point. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 11 Jan 2003 09:19:39 +0000
parents ff0642fab1d5
children 7c9f3d0fe8b2
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h	Sat Jan 11 08:40:25 2003 +0000
+++ b/src/protocols/oscar/aim.h	Sat Jan 11 09:19:39 2003 +0000
@@ -113,11 +113,6 @@
  */
 #define MAXCHATMSGLEN 512
 
-/*
- * Standard size of an AIM authorization cookie
- */
-#define AIM_COOKIELEN            0x100
-
 #define AIM_MD5_STRING "AOL Instant Messenger (SM)"
 
 /*
@@ -595,6 +590,7 @@
 	fu16_t regstatus;
 	char *email;
 	char *bosip;
+	fu16_t cookielen;
 	fu8_t *cookie;
 	char *chpassurl;
 	struct aim_clientrelease latestrelease;
@@ -605,6 +601,7 @@
 struct aim_redirect_data {
 	fu16_t group;
 	const char *ip;
+	fu16_t cookielen;
 	const fu8_t *cookie;
 	struct { /* group == AIM_CONN_TYPE_CHAT */
 		fu16_t exchange;
@@ -1054,7 +1051,7 @@
 
 
 /* auth.c */
-faim_export int aim_sendcookie(aim_session_t *, aim_conn_t *, const fu8_t *);
+faim_export int aim_sendcookie(aim_session_t *, aim_conn_t *, const fu16_t length, const fu8_t *);
 
 faim_export int aim_admin_changepasswd(aim_session_t *, aim_conn_t *, const char *newpw, const char *curpw);
 faim_export int aim_admin_reqconfirm(aim_session_t *sess, aim_conn_t *conn);