summaryrefslogtreecommitdiff
path: root/src/irc/core/sasl.c
AgeCommit message (Collapse)Author
2018-02-02do not reuse sasl timeoutailin-nemui
2017-11-30fix commentsailin-nemui
2017-01-24Prevent a memory leak during the processing of the SASL response.LemonBoy
We also get rid of an allocation in the process of doing so.
2016-12-12Add an option to stop the connection when SASL fails.LemonBoy
2016-08-29SASL: handle fragmentationKenny Root
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.
2016-06-01Correct the name of the emitted signal.LemonBoy
There's a typo in 'sasl_fail', the signal that's emitted should be 'server sasl failure' and not 'server sasl fail'.
2016-03-20Use 0 as a sentinel value for sasl_timeoutLemonBoy
If sasl_timeout is never initialized with a valid timeout id then calling /disconnect on the server calls g_source_remove() with 0 as tag, causing an harmless error message to be printed. Beside that, the sasl_timeout field is defined as a unsigned int. We can use 0 as sentiel since g_timeout_add returns tags that are always greater than zero.
2016-03-11Remove sasl timeout source when the server disconnectsdequis
2016-03-08Fix SASL EXTERNAL authenticationMantas Mikulėnas
The "AUTHENTICATE" command is always required – it's part of the IRCv3 SASL framing. RFC 4422 only documents the Base64 payload.
2015-09-21Use formats instead of g_warningLemonBoy
Add some copyright headers here and there too.
2015-09-11Don't handle 908 as a critical failureLemonBoy
"if the mechanism is unknown, 908 is optional, 904 (or equivalent error condition) is required"
2015-09-11Parse the error string received by the serverLemonBoy
So that in case of SASL failure the user sees a nice error message.
2015-09-11Consider the SASL handshake successful on 903LemonBoy
2015-09-11Handle event 906 and 908LemonBoy
2015-09-11Explicitly set the authorization id during the PLAIN handshakeLemonBoy
On error show the user the message sent by the server.
2015-09-11Replace spaces with tabsLemonBoy
2015-09-11Address all the points outlined in the first reviewLemonBoy
Replace G_SOURCE_REMOVE with FALSE for the compatibility sake. Zero the timeout id after g_source_remove and when exipred. Save the sasl_* options in sig_chatnet_saved().
2015-09-11SASL supportLemonBoy
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of now. The code gets the values from the keys named sasl_{mechanism,username,password} specified for each chatnet.