Changeset 58b63de6 for irc_cap.c


Ignore:
Timestamp:
2015-10-08T08:34:18Z (4 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
c788e15
Parents:
2f73692
git-author:
dequis <dx@…> (11-09-15 22:07:10)
git-committer:
dequis <dx@…> (08-10-15 08:34:18)
Message:

IRCv3 SASL capability + PLAIN method

Only plain, no other methods. We don't have built-in SSL to implement
EXTERNAL (certfp) and nothing else is worth implementing.

The actual authentication is pretty much like sending a server password
(when the server's authmode isn't closed), which means it happens in
cmd_identify, but this code also calls storage_check_pass() to send the
required success/failure replies.

SASL doesn't give us much benefit other than standards compliance, but
some clients might appreciate it.

And having a fifth way to do the same thing doesn't hurt! Now we have:

  • identify in &bitlbee
  • identify to nickserv (alias for root)
  • 'nickserv' and 'ns' irc commands
  • server password
  • sasl plain
File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_cap.c

    r2f73692 r58b63de6  
    3838
    3939static const cap_info_t supported_caps[] = {
     40        {"sasl", CAP_SASL},
    4041        {"multi-prefix", CAP_MULTI_PREFIX},
    4142        {NULL},
     
    170171        } else if (g_strcasecmp(cmd[1], "END") == 0) {
    171172                irc->status &= ~USTATUS_CAP_PENDING;
     173
     174                if (irc->status & USTATUS_SASL_PLAIN_PENDING) {
     175                        irc_send_num(irc, 906, ":SASL authentication aborted");
     176                        irc->status &= ~USTATUS_SASL_PLAIN_PENDING;
     177                }
     178
    172179                irc_check_login(irc);
    173180
Note: See TracChangeset for help on using the changeset viewer.