Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
SASL: handle fragmentation #506
The IRCv3 SASL extension says that AUTHENTICATION payloads of exactly
Instead of using a hash table from tag to gstring, you could just add a GString * field to IRC_SERVER_REC, which would also make it easier to free the GString buffer if the authentication is interrupted for whatever reason. Also, I think that in those cases with the current version the partial sasl payload would persist across disconnections. That's not desirable.
Also +1 for an upper limit to stop servers from making this buffer grow forever. Atheme seems to use 8192. https://github.com/atheme/atheme/blob/59ca306d8faf1b7a69a82e3d37bb3c751e680f13/modules/saslserv/main.c#L318