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

@ -444,6 +444,8 @@ static void sig_disconnected(IRC_SERVER_REC *server)
gslist_free_full(server->cap_queue, (GDestroyNotify) g_free);
server->cap_queue = NULL;
g_free_and_null(server->sasl_buffer);
/* these are dynamically allocated only if isupport was sent */
g_hash_table_foreach(server->isupport,
(GHFunc) isupport_destroy_hash, server);