comparison libpurple/protocols/jabber/auth.c @ 21360:e747ac0c42d6

propagate from branch 'im.pidgin.pidgin.next.minor' (head bd8f1d754a1b94e5ade30c3b135178b236f7b49a) to branch 'im.pidgin.cpw.resiak.disconnectreason' (head 5d84bcfaddc07cab4419ab9f04b31626421b97ff)
author Will Thompson <will.thompson@collabora.co.uk>
date Mon, 15 Oct 2007 10:45:46 +0000
parents ba41f2a60253 a20ef7180680
children 665e04562de0
comparison
equal deleted inserted replaced
21359:fe57b8062249 21360:e747ac0c42d6
320 * plaintext auth 320 * plaintext auth
321 */ 321 */
322 } else if (!plaintext) { 322 } else if (!plaintext) {
323 char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"), 323 char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"),
324 js->gc->account->username); 324 js->gc->account->username);
325 purple_request_yes_no(js->gc, _("Plaintext Authentication"), 325 purple_request_yes_no_with_hint(js->gc, _("Plaintext Authentication"),
326 _("Plaintext Authentication"), 326 _("Plaintext Authentication"),
327 msg, 327 msg,
328 2, js->gc->account, NULL, NULL, js->gc->account, 328 2, js->gc->account, NULL, NULL, PURPLE_REQUEST_UI_HINT_ACCOUNT, js->gc->account,
329 allow_cyrus_plaintext_auth, 329 allow_cyrus_plaintext_auth,
330 disallow_plaintext_auth); 330 disallow_plaintext_auth);
331 g_free(msg); 331 g_free(msg);
332 return; 332 return;
333 /* Everything else has failed, so fail the 333 /* Everything else has failed, so fail the
515 js->auth_type = JABBER_AUTH_PLAIN; 515 js->auth_type = JABBER_AUTH_PLAIN;
516 516
517 if(js->gsc == NULL && !purple_account_get_bool(js->gc->account, "auth_plain_in_clear", FALSE)) { 517 if(js->gsc == NULL && !purple_account_get_bool(js->gc->account, "auth_plain_in_clear", FALSE)) {
518 char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"), 518 char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"),
519 js->gc->account->username); 519 js->gc->account->username);
520 purple_request_yes_no(js->gc, _("Plaintext Authentication"), 520 purple_request_yes_no_with_hint(js->gc, _("Plaintext Authentication"),
521 _("Plaintext Authentication"), 521 _("Plaintext Authentication"),
522 msg, 522 msg,
523 2, 523 2,
524 purple_connection_get_account(js->gc), NULL, NULL, 524 purple_connection_get_account(js->gc), NULL, NULL,
525 purple_connection_get_account(js->gc), allow_plaintext_auth, 525 PURPLE_REQUEST_UI_HINT_ACCOUNT, purple_connection_get_account(js->gc),
526 disallow_plaintext_auth); 526 allow_plaintext_auth, disallow_plaintext_auth);
527 g_free(msg); 527 g_free(msg);
528 return; 528 return;
529 } 529 }
530 finish_plaintext_authentication(js); 530 finish_plaintext_authentication(js);
531 } else { 531 } else {
609 jabber_iq_send(iq); 609 jabber_iq_send(iq);
610 610
611 } else if(xmlnode_get_child(query, "password")) { 611 } else if(xmlnode_get_child(query, "password")) {
612 if(js->gsc == NULL && !purple_account_get_bool(js->gc->account, 612 if(js->gsc == NULL && !purple_account_get_bool(js->gc->account,
613 "auth_plain_in_clear", FALSE)) { 613 "auth_plain_in_clear", FALSE)) {
614 purple_request_yes_no(js->gc, _("Plaintext Authentication"), 614 purple_request_yes_no_with_hint(js->gc, _("Plaintext Authentication"),
615 _("Plaintext Authentication"), 615 _("Plaintext Authentication"),
616 _("This server requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"), 616 _("This server requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"),
617 2, 617 2,
618 purple_connection_get_account(js->gc), NULL, NULL, 618 purple_connection_get_account(js->gc), NULL, NULL,
619 purple_connection_get_account(js->gc), allow_plaintext_auth, 619 PURPLE_REQUEST_UI_HINT_ACCOUNT, purple_connection_get_account(js->gc),
620 disallow_plaintext_auth); 620 allow_plaintext_auth, disallow_plaintext_auth);
621 return; 621 return;
622 } 622 }
623 finish_plaintext_authentication(js); 623 finish_plaintext_authentication(js);
624 } else { 624 } else {
625 purple_connection_error_reason (js->gc, 625 purple_connection_error_reason (js->gc,