1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00
Commit Graph

20 Commits

Author SHA1 Message Date
Calvin Buckley
a634b34ba4 Rename cap_* funcs to irc_cap_*
Some systems often "namespace" cap_ for themselves, and so irssi's
usage can conflict with their own. Bump ABI for this.
2018-11-25 14:50:47 +00:00
ailin-nemui
c80946bcf5 Disconnect SASL properly in case the sasl module got unloaded from server
stops from getting on the network when sasl is unavailable

fixes #629
2018-09-04 15:50:58 +02:00
ailin-nemui
84f03e0146 do not reuse sasl timeout 2018-02-02 11:43:23 +01:00
ailin-nemui
b332d448f7 fix comments 2017-11-30 11:15:47 +01:00
LemonBoy
19c5178996 Prevent a memory leak during the processing of the SASL response.
We also get rid of an allocation in the process of doing so.
2017-01-24 22:19:50 +01:00
LemonBoy
91c9e871c7 Add an option to stop the connection when SASL fails. 2016-12-12 21:41:06 +01:00
Kenny Root
60d9ec621f 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.
2016-08-29 22:56:30 -07:00
LemonBoy
f1d0c8ff99 Correct the name of the emitted signal.
There's a typo in 'sasl_fail', the signal that's emitted should be
'server sasl failure' and not 'server sasl fail'.
2016-06-01 22:29:13 +02:00
LemonBoy
550fe6f010 Use 0 as a sentinel value for sasl_timeout
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-20 21:47:02 +01:00
dequis
e853392f43 Remove sasl timeout source when the server disconnects 2016-03-11 14:55:31 -03:00
Mantas Mikulėnas
4baefd2574 Fix SASL EXTERNAL authentication
The "AUTHENTICATE" command is always required – it's part of the IRCv3
SASL framing. RFC 4422 only documents the Base64 payload.
2016-03-08 23:13:03 +02:00
LemonBoy
203c00938a Use formats instead of g_warning
Add some copyright headers here and there too.
2015-09-21 00:04:37 +02:00
LemonBoy
24d32c28ee Don't handle 908 as a critical failure
"if the mechanism is unknown, 908 is optional, 904 (or equivalent error condition) is required"
2015-09-11 23:21:33 +02:00
LemonBoy
49c4ea5fd9 Parse the error string received by the server
So that in case of SASL failure the user sees a nice error message.
2015-09-11 23:20:07 +02:00
LemonBoy
1f114d75c6 Consider the SASL handshake successful on 903 2015-09-11 23:17:46 +02:00
LemonBoy
55387dd93d Handle event 906 and 908 2015-09-11 22:23:38 +02:00
LemonBoy
6645d0d38d Explicitly set the authorization id during the PLAIN handshake
On error show the user the message sent by the server.
2015-09-11 22:09:47 +02:00
LemonBoy
171b67441d Replace spaces with tabs 2015-09-11 01:17:18 +02:00
LemonBoy
c90c7deac3 Address all the points outlined in the first review
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-11 01:07:43 +02:00
LemonBoy
b8d3301d34 SASL support
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.
2015-09-11 00:30:16 +02:00