SASL: handle fragmentation

The IRCv3 SASL extension says that AUTHENTICATION payloads of exactly
400 bytes in length indicate that the message is fragmented and will
continue in a subsequent message. Handle the reassembly and splitting of
these messages so that we are compliant with the specification.
This commit is contained in:
Kenny Root 2016-07-03 22:02:02 -07:00
commit 60d9ec621f
3 changed files with 154 additions and 23 deletions

View file

@ -78,7 +78,8 @@ struct _IRC_SERVER_REC {
GSList *cap_queue; /* A list of caps to request on connection */
int cap_complete:1; /* We've done the initial CAP negotiation */
guint sasl_timeout; /* Holds the source id of the running timeout */
GString *sasl_buffer; /* Buffer used to reassemble a fragmented SASL payload */
guint sasl_timeout; /* Holds the source id of the running timeout */
/* Command sending queue */
int cmdcount; /* number of commands in `cmdqueue'. Can be more than