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

670 Commits

Author SHA1 Message Date
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
dx
b15c27cc63 Revert "Don't reset wait_cmd during connection registration (fixes early ISON)" 2017-01-10 03:09:36 -03:00
LemonBoy
38ea52d09f Merge pull request #608 from tijko/master
Follow g_strsplit with call to g_strfreev
2017-01-08 21:55:39 +01:00
Tim Konick
5917bc6f75 Follow g_strsplit with call to g_strfreev 2017-01-07 14:31:35 -08:00
dequis
1831a8e1a7 Don't reset wait_cmd during connection registration (fixes early ISON) 2017-01-06 12:49:56 -03:00
Nei
7a112e0217 Merge branch 'master' into 'security'
Sync to master

See merge request !6
2017-01-03 13:30:39 +01:00
Nei
124bcd4804 Merge branch '4-use-after-free-when-receiving-numeric-432-invalid-nick' into 'security'
avoid server_disconnect

See merge request !4
2017-01-02 17:01:29 +00:00
ailin-nemui
91f48c6f0e Merge pull request #586 from LemonBoy/fix-580
Process the nick changes in queries before the PRIVMSG is handled.
2017-01-02 14:44:07 +01:00
ailin-nemui
508d2e0860 bail out if nick is NULL in irc_query_find
Closes #1
2016-12-19 21:41:47 +01:00
ailin-nemui
77aab79057 avoid server_disconnect
Closes #4
2016-12-19 21:16:37 +01:00
LemonBoy
0d6add02cf Process the nick changes in queries before the PRIVMSG is handled.
Otherwise we end up with the message in the status window since the
frontend knows jack shit about the casemapping option when it tries to
find the associated window for the query.
2016-12-15 19:36:44 +01:00
LemonBoy
91c9e871c7 Add an option to stop the connection when SASL fails. 2016-12-12 21:41:06 +01:00
Alexander Færøy
2be7289085
Rename SSL to TLS.
This patch changes the internal name of SSL to TLS. We also add -tls_*
options to /CONNECT and /SERVER, but make sure that the -ssl_* versions
of the commands continue to work like before.
2016-10-22 20:36:50 +02:00
LemonBoy
3667fd9fd1 Make the cap_complete field unsigned.
Fixes a problem where the field would end up as a negative number when
exposed to the perl scripts.
And move it near the other bit-packed fields so we take advantage of the
packing.
2016-09-30 19:30:43 +02:00
ailin-nemui
8d4d313cc9 Merge pull request #506 from kruton/sasl-400-byte-chunk
SASL: handle fragmentation
2016-09-26 16:43:33 +02: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
dequis
3429c1a0a0 Set the default STATUSMSG to @ instead of @+ if it's missing
This fixes two issues:

- IRCNet doesn't have STATUSMSG, but it supports +channels, and
  including + in the default value meant processing those incorrectly

- The "bahamut hack", for old servers that support but don't advertise
  STATUSMSG, didn't work since ischannel_func doesn't use the default.

The choice of @ intentionally leaves out support for other STATUSMSG
(for example, AzzurraNet's bahamut 1.4 fork seemed to support + and % in
any order, contradicting the comment in the code).

I think this is a decent tradeoff, given how those servers are uncommon
and relying on +# or %# is even less common than @#.

Fixes #531
2016-08-24 19:56:23 -03:00
ailin-nemui
fd371cc345 Merge pull request #422 from LemonBoy/misc-cleanup
Clean up misc.c
2016-06-14 12:35:30 +02:00
LemonBoy
439e21f127 Use ; as separator instead of , 2016-06-13 14:07:04 +02:00
LemonBoy
86c5e56ef4 Make rejoin_channels_mode of type CHOICE 2016-06-12 16:26:18 +02:00
LemonBoy
cc70e8c581 Clean up some GTimeVal juggling 2016-06-05 16:48:27 +02:00
LemonBoy
72712a0c62 Replace strocpy with g_strlcpy
The only difference was that the former returned 1 if the buffer was
overflown, but the return value was never checked.
2016-06-05 16:24:55 +02: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
ailin-nemui
ec4ecd844b Revert "Removed the obsolete SQUERY and SERVLIST commands"
This reverts commit 4beebe3238.
2016-03-29 22:41:01 +02:00
ailin-nemui
2ab2636713 Merge pull request #442 from LemonBoy/fix-435
Do not assume any default value for statusmsg.
2016-03-20 22:06:41 +01: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
LemonBoy
f31d37a852 Make ischannel_func return false for empty strings 2016-03-19 12:11:53 +01:00
LemonBoy
f6c2805b91 Do not assume any default value for statusmsg.
If the server didn't send it then just skip the check, the old value it
defaulted to was possibly overlapping with the CHANTYPES leading to an
incorrect behaviour. Fixes #435.
2016-03-17 22:27:05 +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
eba160ca6d Duplicate the code paths for autocommands. 2016-01-24 23:02:40 +01:00
LemonBoy
2502080871 Change when the autocmds are sent.
As per #175 if a -botcmd is specified for a given channel without a
-bots parameter then the command is sent right after joining the
channel.
2016-01-14 23:54:42 +01:00
Lukas Mai
41088b6f65 make /knockout use /unban to remove bans
/knockout uses /ban to set bans but calls ban_remove() directly to
remove them. This commit makes it use /unban instead. This allows
scripts that hook ban/unban to work automatically with /knockout.
2016-01-08 19:37:29 +01:00
Lukas Mai
cf90b2122e irc/core/irc-commands.c: fix indentation 2016-01-08 18:52:59 +01:00
dequis
82ce1de5b0 irc-cap: Don't send a space at the beginning of the CAP REQ parameter
Turns out it confuses inspircd, making it reply a NAK with empty
parameter. The rest is ACKed anyway. I've already whined at saberuk
and there's a pending pull request over there fixing this issue.

And, of course, this is cleaner.
2015-11-26 19:50:58 -03:00
LemonBoy
d7ef9c590f Correctly alias 'channel' to '#channel'
Use the same approach used in 'irc_channels_join'.
Remove 'irc_nick_strip' since it was unused.
2015-11-19 15:31:32 +01:00
LemonBoy
d4676c9855 Use the PARAM_FLAG_STRIP_TRAILING_WS flag wherever possible. 2015-11-09 23:02:41 +01:00
LemonBoy
8094e87cdf Preserve the sasl_ options across reconnects. 2015-10-28 21:56:35 +01:00
dx
15a40ea6d3 Merge pull request #314 from LemonBoy/sasl_session
Save the sasl state in the session
2015-10-03 22:15:17 -03:00
Alexander Færøy
da3f2f0d01
Set HOST_NAME_MAX to 255, if it's undefined.
Thanks to Jilles and dx.

Fixes #309
2015-10-02 19:55:29 +02:00
LemonBoy
cfff402fe6 Don't set the usermode field if blank
Fixes FS#919
2015-10-02 11:25:30 +02:00
LemonBoy
a475d57183 Save the sasl state in the session
This is seemingly required to have irssi re-authenticate after a
restart.
2015-10-02 10:52:13 +02:00
ailin-nemui
18989e76db Merge pull request #304 from LemonBoy/sasl_user_options
Allow the user to set and modify the SASL parameters
2015-09-26 19:07:54 +02:00
LemonBoy
1a2c479bc0 Allow the user to set and modify the SASL parameters
The /NETWORK ADD command now is able to modify the SASL mechanism, the
username and the password on a chatnet basis.
2015-09-26 18:53:10 +02:00
dequis
7ae7422939 Add multi-prefix to list of capabilities to request
Turns out event_names_list() in irc-nicklist.c already handles this.

event_who() just ignores it, which is probably a good idea since some of
the irc servers I tested this with have a bug that results in sending
multiple prefixes in the NAMES reply but not in the WHO one (they were
forks of ircd-hybrid before 7.3.0)

And NAMES always happens, anyway. WHO is omitted sometimes for huge
channels.
2015-09-23 03:17:29 -03:00
ailin-nemui
211e84c1e9 Merge pull request #267 from kyak/master
Add expandos for hostname
2015-09-21 18:47:09 +02:00
dx
0912a11050 Merge pull request #278 from LemonBoy/sasl
SASL support
2015-09-20 19:19:49 -03: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
Alexander Færøy
a44c4b82de
More format warnings removed. 2015-09-20 23:11:39 +02:00
Alexander Færøy
6c9dcffb5e
Fix formatting warnings. 2015-09-20 22:51:13 +02:00