Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/sasl.c

    r91dd19c r40cfbc5  
    5454        struct xt_node *c, *reply;
    5555        char *s;
    56         int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0, sup_anonymous = 0;
    57         int want_oauth = FALSE, want_hipchat = FALSE, want_anonymous = FALSE;
     56        int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0;
     57        int want_oauth = FALSE, want_hipchat = FALSE;
    5858        GString *mechs;
    5959
     
    7474        }
    7575
    76         want_anonymous = set_getbool(&ic->acc->set, "anonymous");
    7776        want_oauth = set_getbool(&ic->acc->set, "oauth");
    7877        want_hipchat = (jd->flags & JFLAG_HIPCHAT);
     
    8584                } else if (c->text && g_strcasecmp(c->text, "DIGEST-MD5") == 0) {
    8685                        sup_digest = 1;
    87                 } else if (c->text && g_strcasecmp(c->text, "ANONYMOUS") == 0) {
    88                         sup_anonymous = 1;
    8986                } else if (c->text && g_strcasecmp(c->text, "X-OAUTH2") == 0) {
    9087                        sup_gtalk = 1;
     
    145142                xt_free_node(reply);
    146143                return XT_ABORT;
    147         } else if (want_anonymous && sup_anonymous) {
    148                 xt_add_attr(reply, "mechanism", "ANONYMOUS");
    149 
    150                 /* Well, that was easy. */
    151         } else if (want_anonymous) {
    152                 imcb_error(ic, "Anonymous login requested, but not supported by server");
    153                 imc_logout(ic, FALSE);
    154                 xt_free_node(reply);
    155                 return XT_ABORT;
    156         } else if (sup_digest && !(jd->ssl && sup_plain)) {
    157                 /* Only try DIGEST-MD5 if there's no SSL/TLS or if PLAIN isn't supported.
    158                  * Which in practice means "don't bother with DIGEST-MD5 most of the time".
    159                  * It's weak, pointless over TLS, and often breaks with some servers (hi openfire) */
    160 
     144        } else if (sup_digest) {
    161145                xt_add_attr(reply, "mechanism", "DIGEST-MD5");
    162146
Note: See TracChangeset for help on using the changeset viewer.