Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 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 | 78a3d2caf84c |
children | 6c67b7bfe6cf |
comparison
equal
deleted
inserted
replaced
4292:78a3d2caf84c | 4293:79d871c11eb9 |
---|---|
813 info = va_arg(ap, struct aim_authresp_info *); | 813 info = va_arg(ap, struct aim_authresp_info *); |
814 va_end(ap); | 814 va_end(ap); |
815 | 815 |
816 debug_printf("inside auth_resp (Screen name: %s)\n", info->sn); | 816 debug_printf("inside auth_resp (Screen name: %s)\n", info->sn); |
817 | 817 |
818 if (info->errorcode || !info->bosip || !info->cookie) { | 818 if (info->errorcode || !info->bosip || !info->cookielen || !info->cookie) { |
819 char buf[256]; | 819 char buf[256]; |
820 switch (info->errorcode) { | 820 switch (info->errorcode) { |
821 case 0x05: | 821 case 0x05: |
822 /* Incorrect nick/password */ | 822 /* Incorrect nick/password */ |
823 hide_login_progress(gc, _("Incorrect nickname or password.")); | 823 hide_login_progress(gc, _("Incorrect nickname or password.")); |
928 if (bosconn->fd < 0) { | 928 if (bosconn->fd < 0) { |
929 hide_login_progress(gc, _("Could Not Connect")); | 929 hide_login_progress(gc, _("Could Not Connect")); |
930 od->killme = TRUE; | 930 od->killme = TRUE; |
931 return 0; | 931 return 0; |
932 } | 932 } |
933 aim_sendcookie(sess, bosconn, info->cookie); | 933 aim_sendcookie(sess, bosconn, info->cookielen, info->cookie); |
934 gaim_input_remove(gc->inpa); | 934 gaim_input_remove(gc->inpa); |
935 | 935 |
936 return 1; | 936 return 1; |
937 } | 937 } |
938 | 938 |
1316 aim_conn_kill(sess, &tstconn); | 1316 aim_conn_kill(sess, &tstconn); |
1317 debug_printf("unable to reconnect with authorizer\n"); | 1317 debug_printf("unable to reconnect with authorizer\n"); |
1318 g_free(host); | 1318 g_free(host); |
1319 return 1; | 1319 return 1; |
1320 } | 1320 } |
1321 aim_sendcookie(sess, tstconn, redir->cookie); | 1321 aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie); |
1322 break; | 1322 break; |
1323 | 1323 |
1324 case 0xd: /* ChatNav */ | 1324 case 0xd: /* ChatNav */ |
1325 tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHATNAV, NULL); | 1325 tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHATNAV, NULL); |
1326 if (tstconn == NULL) { | 1326 if (tstconn == NULL) { |
1336 aim_conn_kill(sess, &tstconn); | 1336 aim_conn_kill(sess, &tstconn); |
1337 debug_printf("unable to connect to chatnav server\n"); | 1337 debug_printf("unable to connect to chatnav server\n"); |
1338 g_free(host); | 1338 g_free(host); |
1339 return 1; | 1339 return 1; |
1340 } | 1340 } |
1341 aim_sendcookie(sess, tstconn, redir->cookie); | 1341 aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie); |
1342 break; | 1342 break; |
1343 | 1343 |
1344 case 0xe: { /* Chat */ | 1344 case 0xe: { /* Chat */ |
1345 struct chat_connection *ccon; | 1345 struct chat_connection *ccon; |
1346 | 1346 |
1371 g_free(ccon->show); | 1371 g_free(ccon->show); |
1372 g_free(ccon->name); | 1372 g_free(ccon->name); |
1373 g_free(ccon); | 1373 g_free(ccon); |
1374 return 1; | 1374 return 1; |
1375 } | 1375 } |
1376 aim_sendcookie(sess, tstconn, redir->cookie); | 1376 aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie); |
1377 debug_printf("Connected to chat room %s exchange %hu\n", ccon->name, ccon->exchange); | 1377 debug_printf("Connected to chat room %s exchange %hu\n", ccon->name, ccon->exchange); |
1378 } break; | 1378 } break; |
1379 | 1379 |
1380 case 0x0018: { /* email */ | 1380 case 0x0018: { /* email */ |
1381 if (!(tstconn = aim_newconn(sess, AIM_CONN_TYPE_EMAIL, NULL))) { | 1381 if (!(tstconn = aim_newconn(sess, AIM_CONN_TYPE_EMAIL, NULL))) { |
1391 aim_conn_kill(sess, &tstconn); | 1391 aim_conn_kill(sess, &tstconn); |
1392 debug_printf("unable to connect to email server\n"); | 1392 debug_printf("unable to connect to email server\n"); |
1393 g_free(host); | 1393 g_free(host); |
1394 return 1; | 1394 return 1; |
1395 } | 1395 } |
1396 aim_sendcookie(sess, tstconn, redir->cookie); | 1396 aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie); |
1397 } break; | 1397 } break; |
1398 | 1398 |
1399 default: /* huh? */ | 1399 default: /* huh? */ |
1400 debug_printf("got redirect for unknown service 0x%04hx\n", redir->group); | 1400 debug_printf("got redirect for unknown service 0x%04hx\n", redir->group); |
1401 break; | 1401 break; |