Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/family_auth.c @ 25416:6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
places in the code. I've been using the definitions from the jabber
specs, where "user" is me and "buddy" is someone on my buddy list.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 26 Jan 2009 09:12:04 +0000 |
parents | 5ec72dbdd28e |
children | 28b5fcfb7444 |
comparison
equal
deleted
inserted
replaced
25415:584063555949 | 25416:6e1967b0f90b |
---|---|
227 | 227 |
228 aim_tlvlist_add_str(&tlvlist, 0x0001, sn); | 228 aim_tlvlist_add_str(&tlvlist, 0x0001, sn); |
229 | 229 |
230 /* Truncate ICQ and AOL passwords, if necessary */ | 230 /* Truncate ICQ and AOL passwords, if necessary */ |
231 password_len = strlen(password); | 231 password_len = strlen(password); |
232 if (aim_snvalid_icq(sn) && (password_len > MAXICQPASSLEN)) | 232 if (oscar_util_valid_name_icq(sn) && (password_len > MAXICQPASSLEN)) |
233 password_len = MAXICQPASSLEN; | 233 password_len = MAXICQPASSLEN; |
234 else if (truncate_pass && password_len > 8) | 234 else if (truncate_pass && password_len > 8) |
235 password_len = 8; | 235 password_len = 8; |
236 | 236 |
237 aim_encode_password_md5(password, password_len, key, digest); | 237 aim_encode_password_md5(password, password_len, key, digest); |
291 * from what is parsed here. | 291 * from what is parsed here. |
292 */ | 292 */ |
293 tlvlist = aim_tlvlist_read(bs); | 293 tlvlist = aim_tlvlist_read(bs); |
294 | 294 |
295 /* | 295 /* |
296 * No matter what, we should have a screen name. | 296 * No matter what, we should have a username. |
297 */ | 297 */ |
298 if (aim_tlv_gettlv(tlvlist, 0x0001, 1)) { | 298 if (aim_tlv_gettlv(tlvlist, 0x0001, 1)) { |
299 info->sn = aim_tlv_getstr(tlvlist, 0x0001, 1); | 299 info->bn = aim_tlv_getstr(tlvlist, 0x0001, 1); |
300 purple_connection_set_display_name(od->gc, info->sn); | 300 purple_connection_set_display_name(od->gc, info->bn); |
301 } | 301 } |
302 | 302 |
303 /* | 303 /* |
304 * Check for an error code. If so, we should also | 304 * Check for an error code. If so, we should also |
305 * have an error url. | 305 * have an error url. |
392 if (aim_tlv_gettlv(tlvlist, 0x0054, 1)) | 392 if (aim_tlv_gettlv(tlvlist, 0x0054, 1)) |
393 info->chpassurl = aim_tlv_getstr(tlvlist, 0x0054, 1); | 393 info->chpassurl = aim_tlv_getstr(tlvlist, 0x0054, 1); |
394 | 394 |
395 #if 0 | 395 #if 0 |
396 /* | 396 /* |
397 * Unknown. Seen on an @mac.com screen name with value of 0x003f | 397 * Unknown. Seen on an @mac.com username with value of 0x003f |
398 */ | 398 */ |
399 if (aim_tlv_gettlv(tlvlist, 0x0055, 1)) { | 399 if (aim_tlv_gettlv(tlvlist, 0x0055, 1)) { |
400 /* Unhandled */ | 400 /* Unhandled */ |
401 } | 401 } |
402 #endif | 402 #endif |
419 * | 419 * |
420 * Normal SNAC login goes like this: | 420 * Normal SNAC login goes like this: |
421 * - connect | 421 * - connect |
422 * - server sends flap version | 422 * - server sends flap version |
423 * - client sends flap version | 423 * - client sends flap version |
424 * - client sends screen name (17/6) | 424 * - client sends username (17/6) |
425 * - server sends hash key (17/7) | 425 * - server sends hash key (17/7) |
426 * - client sends auth request (17/2 -- aim_send_login) | 426 * - client sends auth request (17/2 -- aim_send_login) |
427 * - server yells | 427 * - server yells |
428 * | 428 * |
429 * XOR login (for ICQ) goes like this: | 429 * XOR login (for ICQ) goes like this: |
458 | 458 |
459 /* | 459 /* |
460 * Subtype 0x0006 | 460 * Subtype 0x0006 |
461 * | 461 * |
462 * In AIM 3.5 protocol, the first stage of login is to request login from the | 462 * In AIM 3.5 protocol, the first stage of login is to request login from the |
463 * Authorizer, passing it the screen name for verification. If the name is | 463 * Authorizer, passing it the username for verification. If the name is |
464 * invalid, a 0017/0003 is spit back, with the standard error contents. If | 464 * invalid, a 0017/0003 is spit back, with the standard error contents. If |
465 * valid, a 0017/0007 comes back, which is the signal to send it the main | 465 * valid, a 0017/0007 comes back, which is the signal to send it the main |
466 * login command (0017/0002). | 466 * login command (0017/0002). |
467 * | 467 * |
468 */ | 468 */ |
525 tlvlist = aim_tlvlist_read(bs); | 525 tlvlist = aim_tlvlist_read(bs); |
526 | 526 |
527 /* | 527 /* |
528 * If the truncate_pass TLV exists then we should truncate the | 528 * If the truncate_pass TLV exists then we should truncate the |
529 * user's password to 8 characters. This flag is sent to us | 529 * user's password to 8 characters. This flag is sent to us |
530 * when logging in with an AOL user's screen name. | 530 * when logging in with an AOL user's username. |
531 */ | 531 */ |
532 truncate_pass = aim_tlv_gettlv(tlvlist, 0x0026, 1) != NULL; | 532 truncate_pass = aim_tlv_gettlv(tlvlist, 0x0026, 1) != NULL; |
533 | 533 |
534 /* XXX - When GiantGrayPanda signed on AIM I got a thing asking me to register | 534 /* XXX - When GiantGrayPanda signed on AIM I got a thing asking me to register |
535 * for the netscape network. This SNAC had a type 0x0058 TLV with length 10. | 535 * for the netscape network. This SNAC had a type 0x0058 TLV with length 10. |
595 static void | 595 static void |
596 auth_shutdown(OscarData *od, aim_module_t *mod) | 596 auth_shutdown(OscarData *od, aim_module_t *mod) |
597 { | 597 { |
598 if (od->authinfo != NULL) | 598 if (od->authinfo != NULL) |
599 { | 599 { |
600 g_free(od->authinfo->sn); | 600 g_free(od->authinfo->bn); |
601 g_free(od->authinfo->bosip); | 601 g_free(od->authinfo->bosip); |
602 g_free(od->authinfo->errorurl); | 602 g_free(od->authinfo->errorurl); |
603 g_free(od->authinfo->email); | 603 g_free(od->authinfo->email); |
604 g_free(od->authinfo->chpassurl); | 604 g_free(od->authinfo->chpassurl); |
605 g_free(od->authinfo->latestrelease.name); | 605 g_free(od->authinfo->latestrelease.name); |