1
0
mirror of https://github.com/irssi/irssi.git synced 2024-08-04 03:34:18 -04:00
Commit Graph

4291 Commits

Author SHA1 Message Date
ailin-nemui
b0fa4dd46d show initial nick and name on first start 2017-11-01 15:51:20 +01:00
ailin-nemui
96c7f68b35 clean up file path after move 2017-10-26 16:15:25 +02:00
Will Storey
8843d4f77d Strip : from <trailing> parameters
This is to fix #601. The function used to extract the mode string
assumed that ":" would only occur in a particular spot. This lead to the
possibility that ":" could be treated as part of things like nicknames
or mode arguments, where it should have been stripped as part of
protocol escaping.
2017-10-24 19:51:01 -07:00
Joseph Bisch
84fc92635a Add event_get_params to fe-fuzz 2017-10-24 13:27:11 -04:00
ailin-nemui
cfa51c5ae2 Merge pull request #770 from horgh/horgh/rm-unused-function
Remove a couple unused functions
2017-10-23 14:29:34 +02:00
Nei
495bdd11cf Merge branch 'fix-16' into 'security'
Prevent a OOB read when parsing IRCNet ! channels

See merge request irssi/irssi!22
2017-10-20 13:23:28 +00:00
Nei
c46bed1e17 Merge branch 'fix-gl-15' into 'security'
Don't proceed with cmd_msg if there was an error splitting msg

See merge request irssi/irssi!21
2017-10-20 15:22:32 +02:00
Nei
3c2ae68073 Merge branch 'fix-dcc' into 'security'
fix dcc

See merge request irssi/irssi!20
2017-10-20 15:22:32 +02:00
Joseph Bisch
0840eaec7b Make split functions return an array with NULL instead of NULL
This avoids undefined behavior in functions that call these split
functions and expect an array back instead of just a NULL pointer.
2017-10-20 15:22:32 +02:00
Nei
f4c8018cfb Merge branch 'fix-gl-13' into 'security'
Fix use after free when channel is destroyed inbetween being synced

See merge request irssi/irssi!19
2017-10-20 15:22:32 +02:00
Joseph Bisch
beb2beba3b Revert "Don't proceed with cmd_msg if there was an error splitting msg"
This reverts commit bd83852d646de28f2e0fe01efe7c9236aa4074d4.
2017-10-20 15:22:32 +02:00
Nei
e37d9b2497 Merge branch 'fix-gl-12' into 'security'
fix out of bounds read in compress_colors

See merge request irssi/irssi!18
2017-10-20 15:22:32 +02:00
Joseph Bisch
73d7b9d775 Don't proceed with cmd_msg if there was an error splitting msg
There may be cases (such as if target or server->nick is very long)
where the split_message function returns NULL, indicating an error. To
avoid a potential segfault, we now check to see if splitmsgs is NULL.
2017-10-20 15:22:32 +02:00
ailin-nemui
9f0dc4766c fix dcc issue 2017-10-20 15:14:10 +02:00
LemonBoy
45dfe2ba38 Prevent a OOB read when parsing IRCNet ! channels
Make sure the string has enough data.
Fixes #16
2017-10-19 11:17:56 +02:00
LemonBoy
28d0b8c746 Merge pull request #771 from paultownsend/issue-120
Add alternate_nick as a network-specific property
2017-10-18 12:00:56 +02:00
Paul Townsend
7b94015f8f Changes based on comments in pull #771. 2017-10-14 17:42:45 +01:00
Will Storey
233be9f580 Mark net_ip_compare() deprecated 2017-10-13 18:30:57 -07:00
Will Storey
da59fd7c2d Revert "Delete unused function net_ip_compare()"
This reverts commit cb5f3cba1f.
2017-10-13 18:28:26 -07:00
ailin-nemui
7b97edf9d1 Merge pull request #769 from horgh/horgh/error-check-server-connect
Set host to an empty string on error
2017-10-13 17:14:47 +02:00
Edward Tomasz Napierala
9895e7b28a Silence down a warning that would appear on "/away" in Capability mode. 2017-10-11 23:52:36 +01:00
Edward Tomasz Napierala
5c0b4aeb05 Sort Capsicum headers. 2017-10-11 23:31:26 +01:00
Edward Tomasz Napierala
1e66cbd62e Improve Capsicum stdio limits to fix terminal state on exit. 2017-10-11 23:13:06 +01:00
Paul Townsend
87955b69cb Add alternate_nick as a network-specific property. 2017-10-11 21:33:14 +01:00
Edward Tomasz Napierala
17b195021d Bump default capsicum_port_max to 9999.
This is needed for servers like ssl.efnet.org, which, per default
config, listen on 9999.
2017-10-11 14:34:38 +01:00
Will Storey
174adee9dd Always initialize the host string
This also removes a wordy comment
2017-10-10 18:21:05 -07:00
Will Storey
b8b90c76d4 Delete unused function net_connect() 2017-10-09 13:20:44 -07:00
Will Storey
3b3939b146 Delete commented out CYGWIN define 2017-10-09 13:14:59 -07:00
Will Storey
cb5f3cba1f Delete unused function net_ip_compare() 2017-10-09 13:14:34 -07:00
Will Storey
4ccff71f67 Set host to an empty string on error
While investigating #317, I noticed that it was possible we would access
an uninitialized buffer due to failing to check the return value of
net_ip2host(). This is done in several places. To make such uses safe,
set the host buffer to an empty string on error. It is possible callers
could be improved by handling the error in each spot, but this gives us
some safety.
2017-10-09 12:50:04 -07:00
Joseph Bisch
2edd816e7d
Fix segfault in query_remove_all
It is possible for rec to be NULL in query_remove_all, resulting in a
segfault. So return without doing anything if rec is NULL.
2017-10-08 22:02:44 -04:00
ailin-nemui
49ace3251b fix uaf in chanquery module
the chanquery needs to be removed in any case if a channel rec is
destroyed, regardless of any state

Fixes GL#13
2017-10-08 19:48:11 +02:00
ailin-nemui
00c80cb6fc fix out of bounds read in compress_colors
Reported by Hanno Böck.

Fixes GL#12
2017-10-07 20:48:53 +02:00
Edward Tomasz Napierala
40ae8f5fa6 Limit capsicum rights to stdio.
This requires FreeBSD fix (https://reviews.freebsd.org/D12622)
to work properly.
2017-10-07 03:28:02 +01:00
ailin-nemui
5da0b73a12 up abi 2017-10-06 15:31:59 +02:00
ailin-nemui
deac66f33c add a key binding to erase history entries
it is possible to delete the current history entry using the
erase_history_entry key binding
2017-10-06 15:31:52 +02:00
ailin-nemui
16d68a86ca add two XSFuncs to manipulate command history entries
it is possible to use Irssi::UI::Window::get_history_entries to save the
history entries, load_history_entries to load entries into the command
history and delete_history_entries to remove history entries (for example
to remove history selectively)
2017-10-06 15:02:15 +02:00
ailin-nemui
1fd285dccf refactor history to use history_entries list
this allows access to the global history even when a using /window history
named or /set window_history on, and you want to recall something from one
of the other windows' histories.

usage (default): ctrl+up/down
2017-10-06 14:58:47 +02:00
ailin-nemui
92dbb1895b Merge pull request #754 from ailin-nemui/fix-752
add new function to set the position in bytes
2017-10-05 11:31:44 +02:00
ailin-nemui
1f7de4c3bd up abi 2017-10-05 11:31:33 +02:00
ailin-nemui
8dfeca57ed hidden lines 2017-09-21 14:20:31 +02:00
ailin-nemui
0468c5d912 add new function to set the position in bytes
fixes #752
2017-09-15 13:47:01 +02:00
ailin-nemui
fc8c15fcd7 Merge pull request #755 from trasz/capsicum
Get rid of the zombies in Capsicum capability mode.
2017-09-15 13:40:17 +02:00
Edward Tomasz Napierala
624ef4a696 Get rid of the zombies in Capsicum capability mode.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-09-12 14:19:17 +01:00
LemonBoy
36d8b974fc Restore compatibility with old OpenSSL versions
Let's implement X509_STORE_up_ref on our own.
2017-09-11 17:19:20 +02:00
LemonBoy
96d5a4669d Increment the X509_STORE refcount during the connection
OpenSSL doesn't increment the reference count when the store is assigned
to a SSL_CTX.
2017-09-11 16:32:36 +02:00
ailin-nemui
24ad80177b Merge pull request #735 from trasz/capsicum
Add Capsicum support
2017-09-10 19:43:59 +02:00
Edward Tomasz Napierala
b529e1a9df Fix /back in Capsicum capability mode.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-09-08 13:14:24 +01:00
LemonBoy
7086eae650 Complete filenames ending with a slash 2017-08-29 21:03:42 +02:00
ailin-nemui
13471013f3 Merge pull request #737 from ailin-nemui/fix-733
Revert "Merge pull request #452 from LemonBoy/terminfo-cup"
2017-08-10 16:49:32 +02:00
Edward Tomasz Napierala
edee0ba587 Don't error out on failure to load default certificate store.
This restores the previous behaviour.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-08-10 14:35:34 +01:00
Joseph Bisch
1ad38b27e4 Merge pull request #738 from trasz/master
Fix indentation; no functional changes.
2017-08-09 10:29:10 -04:00
Edward Tomasz Napierala
4bcbb41113 Fix indentation; no functional changes.
(Take two.)

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-08-09 14:36:06 +01:00
Edward Tomasz Napierala
0c49a84ffb Add back some ifdefs.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-08-09 11:06:36 +01:00
ailin-nemui
947682e5dd Revert "Merge pull request #452 from LemonBoy/terminfo-cup"
Fixes #733. The fix outlined in #452 had adverse effects for the
following reason. The code removed the restoration path that would go on
the code path from kill SIGTSTP. The problem is this: When Irssi is not
running in a controlling parent (like a shell), the TSTP will in fact be
ignored. In that case, there is no process sending a CONT either and
thus the screen state never gets restored. Luckily, the patch in #457 is
sufficient to prevent the problem in #450 (which lead to the development
of #452). To that end, we do end up with potentially calling
terminfo_cont twice but that is better than not calling it at all.

This reverts commit b1ffd5f647, reversing
changes made to 9cb0419435.
2017-08-07 15:29:17 +02:00
Paul Townsend
788e47032f Update /CONNECT and /SERVER syntax tags (-ssl -> -tls). 2017-08-05 21:02:35 +01:00
Edward Tomasz Napierala
5db6caee0d Attempt to fix build by adding the forgotten header.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-08-01 01:50:16 +01:00
Edward Tomasz Napierala
96f4fe10c6 Change the way we load default CA certificates so it works with Capsicum.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-08-01 01:47:45 +01:00
Edward Tomasz Napierala
aeaa420ad3 Clean up includes a bit.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-08-01 01:15:25 +01:00
Edward Tomasz Napierala
5551b4fe95 Update copyrights.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-30 11:47:08 +01:00
Edward Tomasz Napierala
8bb392a3f4 Hook up capsicum.h and fe-capsicum.h to autotools.
This hopefully fixes Travis build.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-30 01:27:33 +01:00
Edward Tomasz Napierala
a29eeaa9f2 Fix trailing slash handling for capsicum_irclogs_path.
This is mostly an anti-footshooting measure, but still.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
7f2697d307 Cosmetics.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
8c04c2be14 Fix build without Capsicum.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
12e2c46d6a Add wrappers to reduce #ifdefs.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
c00d4753ae Restrict port range available in capability mode.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
e777ae986d Working autolog.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
241dd66ac1 Working /log and /rawlog.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
939371aa1d Fix warnings.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
1f57ceec4c Prevent the user from calling "/capsicum enter" twice.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
509eca76f0 Make DNS work in capability mode.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
f4546be7ec Reorder functions.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
925240155e Config file support for "capsicum" parameter.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
cec68557aa /connect works - although only with IP addresses. 2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
3200c381db Rename to "/capability enter" and "/capability status".
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
d5d45c29b8 Add capability mode error/success messages.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
56c94570b4 Implement /cap_enter.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
2914498b29 Consistency: use FALSE instead of 0.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 10:42:53 +01:00
Edward Tomasz Napierala
08dc6734b9 When rawlog open fails, there's no point in trying to write. Don't.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 10:40:42 +01:00
Edward Tomasz Napierala
42b5e89f6e Add missing diagnostics for rawlog open().
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-28 04:49:14 +01:00
Edward Tomasz Napierala
e08e2bd87a Don't compute log_dir_create_mode in three different places.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-28 03:56:02 +01:00
ailin-nemui
437fbef6eb Merge pull request #719 from LemonBoy/sasl-disable-none
Setting sasl_mechanism to '' disables the auth
2017-07-26 10:57:05 +02:00
LemonBoy
d971c02920 Allow the user to clear the sasl-related fields
There was no easy way for the user to disable the SASL authentication or
to clear the username/password once the network was created.
Closes #718
2017-07-25 22:53:33 +02:00
Nei
f67e766934 Merge branch 'fix-11' into 'security'
Correct GHashTable usage

See merge request !16
2017-07-05 14:46:42 +00:00
Nei
fc3615120d Merge branch 'fix-10' into 'security'
Check return value of localtime

See merge request !15
2017-07-05 14:46:24 +00:00
ailin-nemui
73b851c39c correct GHashTable usage 2017-07-04 16:11:45 +02:00
ailin-nemui
1656dc1e54 Merge pull request #653 from ailin-nemui/regexex
Enable UTF8 in GRegex
2017-07-03 09:53:09 +02:00
Nei
29ebac987d Check return value of localtime
Fixes #10
2017-06-29 13:48:44 +00:00
ailin-nemui
2b209348bd Merge pull request #722 from dequis/back-to-the-future
parse_time_interval: Allow negative time in settings
2017-06-23 18:00:51 +02:00
ailin-nemui
28d82c8f63 Merge pull request #709 from osm/master
Escape nicks during nick completion when expand_escapes is enabled
2017-06-23 18:00:04 +02:00
ailin-nemui
9d32636ebe Merge pull request #703 from vague666/server_modify_port
Allow -port <num> or irc.host.tld <num> in /server add
2017-06-23 17:59:02 +02:00
ailin-nemui
c56919768e Merge pull request #721 from dequis/unexpected-exits
term-terminfo: Avoid switching out of alt screen on unexpected exits
2017-06-23 17:58:40 +02:00
ailin-nemui
bbf8b86074 remove const 2017-06-22 09:33:33 +02:00
Oscar Linderholm
12d671a056 Escape nicks during nick completion when expand_escapes is enabled
Fixes #693
2017-06-21 10:40:47 +02:00
ailin-nemui
02a5d1a00b fix weird n-fold unescaping 2017-06-19 14:09:02 +02:00
ailin-nemui
1fc170ee11 Merge branch 'master' into regexex 2017-06-19 11:06:24 +02:00
dequis
7354a74c65 parse_time_interval: Allow negative time in settings
This splits sign parsing out of parse_time_interval_uint() so that the
negative sign is applied outside of the unsigned context where the
number parsing is done, and after all the checks that it's lower than
(1 << 31)

This fixes issues with settings like `server_reconnect_time`,
`server_connect_timeout` and `lag_max_before_disconnect`, which accepted
-1 as a valid value.
2017-06-17 15:34:36 -03:00
dequis
4b1c60b2ec term-terminfo: Avoid switching out of alt screen on unexpected exits
Perl sucks and kills the whole process when there's a version mismatch
in Perl_xs_handshake(). Our atexit handler catches the exit and
deinitializes the terminal, removing the error.

This commit uses the 'quitting' global variable which is set when irssi
is voluntarily quitting, and avoids sending TI_rmcup, which restores the
original screen and makes the error invisible.
2017-06-17 13:47:13 -03:00
ailin-nemui
3246001fb4 Merge pull request #715 from dequis/lastlog-glist-performance
Performance improvements for /lastlog
2017-06-07 00:15:45 +02:00
ailin-nemui
5e9a3ad80c Merge pull request #714 from dequis/dcc-fname-gcc-warnings
fe-dcc-(get|send): Fix some -Wpointer-compare with newer gcc
2017-06-07 00:15:05 +02:00
dequis
e498265328 Performance improvements for /lastlog -before
This avoids the use of g_list_find() to find if a match was already
added to the list of results, by checking the last two added matches
instead.

Checking just the last match isn't enough because a NULL match is added
as a separator (shown as -- in the UI)
2017-06-05 18:11:47 -03:00
dequis
0e44ea8916 Performance improvements for /lastlog with big result sets
This applies to "/lastlog" with no filters (or with filters that don't
filter a lot) and with large amounts of text in the scrollback.

Test case:

    /exec seq 1 500000
    /lastlog -file log.txt

Thanks to morning for reporting this.
2017-06-05 18:10:27 -03:00
dequis
52bb06ccd9 fe-dcc-(get|send): Fix some -Wpointer-compare with newer gcc
The warning itself:

>warning: comparison between pointer and zero character constant [-Wpointer-compare]

Harmless stuff as far as I can tell.

The fix adds a null check that probably isn't needed. The old code that
compared against '\0' worked a lot like a null check so it makes sense
to keep that, while also adding the intended check for empty string.

This was visible with "/dcc close send a" showing an empty filename.
The equivalent for get didn't show the filename in the format string.
2017-06-05 15:58:43 -03:00
Ailin Nemui
fb08fc7f1a Merge remote-tracking branch 'gitlab/security' 2017-06-05 15:12:16 +02:00
ailin-nemui
4edfccfce7 get rid of new_text 2017-06-05 13:46:43 +02:00
ailin-nemui
48899a123d Update iregex-gregex.c
add 2 comments about new_string
2017-06-05 10:23:16 +02:00
ailin-nemui
00354c3651 Update iregex-gregex.c
make helper functions static
2017-06-05 10:10:38 +02:00
Jari Matilainen
f28c64a3dc Make backward compatible with ssl flags 2017-06-04 19:47:30 +02:00
ailin-nemui
78a390f479 abi up 2017-06-04 19:03:40 +02:00
Jari Matilainen
e84adeca15 change ternary operator to if/else statements, add default ssl port support 2017-06-04 17:41:38 +02:00
ailin-nemui
79bbca4644 Refactor regex and implement UTF8 mode for GRegex
- with non-unicode byte to Private Use Area A mapping
- move all ifdefs to iregex.h file only
2017-06-04 00:52:53 +02:00
ailin-nemui
31b9d115b0 Merge pull request #706 from dequis/parse-uint
Add parse_uint function to improve integer overflow handling
2017-06-02 14:47:38 +02:00
Joseph Bisch
1ce9e07be0
Use CXX for fe-fuzz linking 2017-06-01 23:59:19 -04:00
Nei
200eb5922e Merge branch 'fix-gl9' into 'security'
Fix dcc_request where addr is NULL

See merge request !13
2017-05-30 19:39:06 +00:00
Joseph Bisch
528f51bfbe
Fix dcc_request where addr is NULL 2017-05-29 14:53:26 -04:00
Joseph Bisch
30a92754bb
Fix oob read of one byte in get_file_params_count{,_resume}
We can use continue to handle cases such as:
"ab<space><space>c"
2017-05-29 14:43:24 -04:00
ailin-nemui
d61c54c32b do not reset true colour bit on colour reset
fixes #710
2017-05-27 00:12:54 +02:00
dequis
632b0ce5e6 Add parse_uint function to improve integer overflow handling
Originally found by oss-fuzz (issue 525) in get_ansi_color using ubsan.
After a lot of analysis I'm 99% sure this isn't security relevant so
it's fine to handle this publicly.

The fix is mainly adding a function that does it right and use it
everywhere. This is harder than it seems because the strtol() family of
functions doesn't have the friendliest of interfaces.

Aside from get_ansi_color(), there were other pieces of code that used
the same (out*10+(*in-'0')) pattern, like the parse_size() and
parse_time_interval() functions, which are mostly used for settings.
Those are interesting cases, since they multiply the parsed number
(resulting in more overflows) and they write to a signed integer
parameter (which can accidentally make the uints negative without UB)

Thanks to Pascal Cuoq for enlightening me about the undefined behavior
of parse_size (and, in particular, the implementation-defined behavior
of one of the WIP versions of this commit, where something like signed
integer overflow happened, but it was legal). Also for writing
tis-interpreter, which is better than ubsan to verify these things.
2017-05-18 00:21:11 -03:00
Jari Matilainen
0c26aeb9fc Make sure port is only set on /server modify if specified 2017-05-15 23:07:01 +02:00
ailin-nemui
10cea61696 Merge pull request #702 from vague666/server_modify_notls
Added support for -notls and -notls_verify
2017-05-14 09:44:26 +02:00
ailin-nemui
81cf8d8813 Update fe-server.c 2017-05-14 09:43:38 +02:00
Jari Matilainen
4a6fbdbe78 Spaces to tabs 2017-05-14 03:01:01 +02:00
ailin-nemui
371eb7f505 expand macro 2017-05-12 16:27:33 +02:00
ailin-nemui
787e192567 improve nicklist performance 2017-05-12 13:36:48 +02:00
Jari Matilainen
783458e9ba Added code comments 2017-05-11 14:08:45 +02:00
Jari Matilainen
25f9c71f69 Allow -port <num> or irc.host.tld <port num> in /server add and /server modify 2017-05-11 14:02:23 +02:00
Jari Matilainen
f060292a9c Added braces 2017-05-11 11:17:14 +02:00
Jari Matilainen
dbde9f0fe3 Added support for -notls and -notls_verify 2017-05-11 10:57:24 +02:00
LemonBoy
c890ecafa0 Merge pull request #686 from josephbisch/remove-history-wrap
Don't allow command history to wrap around
2017-04-11 15:19:19 +02:00
Joseph Bisch
3297fafcd9
Add syntax info for completion
Allows syntax info to be picked up and displayed by help command.

Fixes #687
2017-04-07 12:56:46 -04:00
Joseph Bisch
405136440c
Remove over_counter
We are no longer using over_counter for any functional purpose, so
remove it.
2017-04-07 08:20:28 -04:00
Joseph Bisch
7c86575b02
Don't allow command history to wrap around
This changes the behavior of the command history to avoid wrapping back
to the bottom once the top of the history is reached.
2017-04-06 20:27:39 -04:00
Joseph Bisch
41776d71f7
Fix strange history behavior when history is empty
If text is being entered and then the user presses the up arrow
followed by the down arrow, the expected behavior is to return to the
text being entered. Prior to this commit that was not the case.

Fixes #462
2017-04-05 11:00:25 -04:00
Joseph Bisch
a4cc4e0ad7
Fix off by one error with char_expandos 2017-03-31 15:37:48 -04:00
Stephen Oberholtzer
2b9be6e2ed Intentation/whitespace fixes
Change several instances of space-indentation to tabs, matching the
surrounding code.
2017-03-21 10:27:39 -04:00
Stephen Oberholtzer
70f9db3cbd Fix delay at startup when running against glib 2.49.3+
In glib v2.49.3, an optimization was made to eliminate certain
unnecessary wakeups.  (The specific change was made in
e4ee3079c5afc3c1c3d2415f20c3e8605728f074). Before this change, the
first call to g_main_iteration would always complete immediately.
In Irssi, this effectively reversed the order of the main loop, causing
the reload_config check and the dirty_check to run *before* the first
blocking call to g_main_iteration.

With the new logic, the first g_main_iteration call now blocks,
preventing the screen from being refreshed until the user starts typing
or a timer goes off.  (It also delays processing of SIGHUP, but I
expect that is not a common situation.)

This commit reorders the main loop to wait at the end of the loop,
rather than the beginning, addressing the problem.

(This closes Debian bug #856201.)
2017-03-21 09:37:23 -04:00
ailin-nemui
966efced3c up abi ver 2017-03-14 09:54:28 +01:00
ailin-nemui
e2e02160cd Merge pull request #645 from LemonBoy/keyboard-misc
Timeout feature for keys
2017-03-11 23:11:43 +01:00
Ailin Nemui
77b2631c78 Merge branch 'netjoin-timeout' into 'master'
fe-netjoin: remove irc servers on "server disconnected" signal

Closes #7

See merge request !10
2017-03-10 17:18:18 +01:00
dequis
93c158d815 expand_escape: expand double backslash as a backslash 2017-03-08 20:01:05 -03:00
ailin-nemui
d57c64adeb Merge pull request #667 from ailin-nemui/fix-dcc-get
fix dcc get

fixes #656
2017-03-08 09:45:40 +01:00
ailin-nemui
ddba68ad77 Merge pull request #659 from ailin-nemui/foreach_dontspam
make foreach send commands
2017-03-07 23:37:23 +01:00
ailin-nemui
7bd1b80687 fix dcc get
fixes #656
2017-03-07 23:27:08 +01:00
ailin-nemui
62fd3ac180 Revert "Quote the filename when dcc requests are auto accepted." 2017-03-06 11:27:55 +01:00
ailin-nemui
29f27cfb39 Merge pull request #658 from LemonBoy/dcc-autoaccept
Quote the filename when dcc requests are auto accepted.
2017-03-04 21:43:21 +01:00
LemonBoy
dc99f8d7a5 Properly check the command arguments in tail place.
A command requiring an argument and given in tail position would not
raise an error but silently set the value to the empty string ''.
2017-03-04 21:37:13 +01:00
Nei
7ef22687f9 Merge branch 'd-minor' into 'master'
Prevent some potential null-pointer deferences.

See merge request !9
2017-03-04 20:35:17 +00:00
Stephen Oberholtzer
5c4e6304ce Don't emit the script destroyed signal before script is actually destroyed
The script unloading code originally worked like this:

1. Destroy package
2. Emit 'script destroyed' signal
3. Unhook script's signal handlers

If a script added a 'script destroyed' signal handler, unloading
that script would cause the 'script destroyed' signal to be sent to the
(already destroyed) package.  This would cause a script error, which would
trigger a script unload, which would start the whole process over again,
until we run out of heap or stack space and segfault.

This commit simply reorders the operations so that the 'script destroyed'
signal is sent *after* the script is fully destroyed.
2017-02-28 23:48:56 -05:00
dequis
7c09b72848 fe-netjoin: remove irc servers on "server disconnected" signal 2017-02-27 23:43:37 -03:00
ailin-nemui
fa1a056291 Merge pull request #647 from dequis/fix-early-ison-take-2
notify-ison: Don't send ison before the connection is done
2017-02-27 14:45:41 +01:00
ailin-nemui
9aaa6449a0 make foreach send commands 2017-02-27 13:43:58 +01:00
LemonBoy
027acffb42 Handle file names with quotes.
Let's repurpose escape_string and make it more flexible by letting us
choose the characters to escape.
2017-02-22 11:49:09 +01:00
LemonBoy
db85ab7c90 Quote the filename when dcc requests are auto accepted.
PR #453 forces the user to quote the filenames given to /DCC commands
when they contain spaces but the autoget functionality didn't get
updated so the filename was always passed without quotes.

Closes #656.
2017-02-21 15:17:37 +01:00
LemonBoy
9cae98e642 Execute what's left in the input queue when the timeout expires.
Similar to how vim behaves.
2017-02-18 15:57:55 +01:00
ailin-nemui
540639e0fa Merge pull request #627 from LemonBoy/ssl-expiry
Check whether the client certificate is expired.
2017-02-15 15:49:00 +01:00
LemonBoy
c067f8e99b Do not alias /server <hostname> to /server connect <hostname>
Closes #559.
2017-02-14 23:02:05 +01:00
LemonBoy
98ead50b4e Prevent some potential null-pointer deferences.
Spotted by our friend scan-build.
2017-02-14 14:46:14 +01:00
dequis
15736ba5ab notify-ison: Don't send ison before the connection is done 2017-02-11 00:07:03 -03:00
ailin-nemui
653c7fb05a Merge pull request #622 from ailin-nemui/starttls
provide net_start_ssl api
2017-02-06 12:38:20 +01:00
ailin-nemui
28df637055 provide net_start_ssl api
fixes #615
2017-02-05 23:08:42 +01:00
ailin-nemui
ff5dd3673e Merge pull request #628 from LemonBoy/openssl-compat
Support OpenSSL 1.1.0.
2017-02-05 22:20:31 +01:00
LemonBoy
73e8a065bd Support OpenSSL 1.1.0.
- X509_get_notBefore becomes X509_get0_notBefore
- X509_get_notAfter becomes X509_get0_notAfter
- ASN1_STRING_data becomes ASN1_STRING_get0_data (and drops the const)
- The whole library is now initialized by OPENSSL_init_ssl

Closes #597
2017-02-03 13:29:19 +01:00
Nei
aab24cf4a4 Merge branch 'dub-the-wub' into 'master'
Prevent a memory leak during the processing of the SASL response.

See merge request !8
2017-02-03 11:49:16 +00:00
ailin-nemui
1ee25d2286 Merge pull request #590 from LemonBoy/hi-minor
Minor cleanup in the highlighting signal.
2017-01-31 14:18:48 +01:00
ailin-nemui
4031b92b9b Merge pull request #626 from ailin-nemui/textbuffer_monospace
support storing and replaying the monospace attribute in textbuffer
2017-01-31 14:17:44 +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
697dd19d88 Check whether the client certificate is expired.
Right now we only warn the user, the connection keeps going.
Fixes #211
2017-01-22 21:58:55 +01:00
ailin-nemui
876c1dd93e implement break_wide
for more pleasant east asian mixed display
2017-01-20 10:32:23 +01:00
Joseph Bisch
c8dafe2a76
Add SUPPRESS_PRINTF_FALLBACK
There are some cases (such as fuzzing with fe-fuzz) where suppressing
printf output may be desirable.
2017-01-16 12:56:33 -05:00
Hanno
677fb1f55c
perl_parse needs NULL terminated parameter list. 2017-01-15 22:20:23 +01:00
LemonBoy
305b02fc63 Merge pull request #613 from ailin-nemui/fix_completion
fix regression in completion
2017-01-13 22:36:44 +01:00
Alexander Færøy
7732bbed5e Merge pull request #610 from josephbisch/fe-fuzz
Add frontend for fuzzing
2017-01-13 00:16:30 +01:00
Joseph Bisch
fe1ea4b80a
Fix fe-fuzz nits 2017-01-12 18:11:09 -05:00
dx
b15c27cc63 Revert "Don't reset wait_cmd during connection registration (fixes early ISON)" 2017-01-10 03:09:36 -03:00
Joseph Bisch
abdae2d5fc
Don't duplicate module-formats.* in fe-fuzz 2017-01-09 08:19:01 -05:00
ailin-nemui
17fc77565e fix regression in completion
fixes #609
2017-01-09 13:19:37 +01: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
Joseph Bisch
cf46907256
Add frontend for fuzzing
Use the following configure command:

$ ./configure --with-fuzzer --with-fuzzer-lib=/path/to/libFuzzer.a \
      CC=clang CXX=clang++

Places an irssi-fuzz in src/fe-fuzz/ after build.

Also can specify SANFLAGS to override the chosen sanitizer flags
(defaults to "-g -fsanitize=address -fsanitize-coverage=trace-pc-guard").
2017-01-07 20:01:07 -05: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
dequis
752f484c6c Add OPENSSL_NO_EC for solaris 11.3, see issue #598
Original patch by 'Slarky'

According to that ticket, the next major version of solaris won't need
this. Consider reverting this when solaris 11.3 stops being relevant.
2017-01-06 11:47:24 -03:00
Martijn Dekker
c9c45e4f89 make irssi --with-perl build with separate object directory
irssi 1.0.0 will not build if Perl is enabled and a separate
object code directory is used. The problem was a relative path
to an internal Perl dependency in four Makefile.PL.in files.
2017-01-06 12:24:36 +01:00
ailin-nemui
33107be748 fix GRegex GError problem 2017-01-05 13:06:55 +01:00
Nei
7a112e0217 Merge branch 'master' into 'security'
Sync to master

See merge request !6
2017-01-03 13:30:39 +01:00
ailin-nemui
01163710e7 Merge pull request #585 from ailin-nemui/win_seq
g_sequence backing for window list
2017-01-03 12:45:50 +01:00
Ailin Nemui
1f72b8e66a up abi version 2017-01-03 12:29:52 +01:00
Ailin Nemui
f5cbbebc2e switch for gregex and regex.h 2017-01-03 12:29:11 +01:00
Nei
1b99299ed2 Merge branch 'percent_flag' into 'security'
fix %[

See merge request !5
2017-01-02 17:01:47 +00: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
Nei
c3cca5ecf3 Merge branch '1-null-pointer-dereference-in-irc_nickcmp_rfc1459' into 'security'
bail out if nick is NULL

See merge request !3
2017-01-02 17:01:05 +00:00
Nei
24d2d039b5 Merge branch '3-out-of-bounds-read-with-invalid-utf8-in-term_addstr' into 'security'
Fix oob read on invalid utf8 in term_addstr

See merge request !2
2017-01-02 17:00:44 +00:00
Nei
7daa7a6aa9 Merge branch '2-out-of-bounds-read-of-one-byte-with-x1b-48-in-truecolor-builds' into 'security'
check for end of string in ansi 48

See merge request !1
2017-01-02 17:00:15 +00:00
LemonBoy
5dcf291f21 Use the RAW flag when building the regexps.
Also, plugged a memory leak when retrieving the match position.
2017-01-02 17:50:14 +01:00
LemonBoy
5eaead761f Rebase against master. 2017-01-02 17:50:14 +01:00
LemonBoy
3fcd3cd2b9 Remove the regexp_compiled field.
It was made redundant by the introduction of the pointer to the GRegex
structure.
Silence the compiler warning in textbuffer.c about preg being
initialized by setting it to NULL.
2017-01-02 17:50:14 +01:00
LemonBoy
8e5db471e4 Use GLib's regexp interface (backed by PCRE) 2017-01-02 17:50:14 +01: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
LemonBoy
7e22d051ae Make sure SASL was actually requested before failing. 2017-01-01 23:08:38 +01:00
ailin-nemui
77ff8f5b74 Merge pull request #514 from LemonBoy/sasl_fail
Add an option to stop the connection when SASL fails.
2016-12-21 15:29:26 +01:00
ailin-nemui
07050e2a3c Merge pull request #587 from ailin-nemui/sbar_crash
add assertion to statusbar_read_group
2016-12-21 15:28:17 +01:00
ailin-nemui
9151f87145 remove some for loops 2016-12-20 21:40:18 +01:00
ailin-nemui
9a018a782c sort windows_seq helpers to top 2016-12-20 21:36:56 +01:00
ailin-nemui
03f5dc63fe nits 2016-12-20 21:33:51 +01:00
ailin-nemui
9004265e54 clean up window_refnum_{prev,next} 2016-12-20 21:01:16 +01:00
ailin-nemui
7dc2f832c1 fix %[ 2016-12-20 16:41:57 +01:00
ailin-nemui
2f59fe2062 add some sequence helper functions 2016-12-19 22:03:46 +01:00
Joseph Bisch
8007e9e61d
Fix oob read on invalid utf8 in term_addstr 2016-12-19 15:52:05 -05: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
a39e210ea8 Minor cleanup in the highlighting signal. 2016-12-18 15:46:48 +01:00
LemonBoy
7a7f6abc16 Prevent a UaF by calling server_disconnect in a signal handler. 2016-12-15 22:41:57 +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
ailin-nemui
7b856d628b check for end of string in ansi 48 2016-12-15 18:01:26 +01:00
ailin-nemui
17e42649bb reset background for mirc colour 99
fix #571
2016-12-15 17:06:40 +01:00
ailin-nemui
59242cb595 add assertion to statusbar_read_group
fix #564
2016-12-15 16:59:38 +01:00
ailin-nemui
365097319f manually redraw the activity list on expose only
might speed up /foreach query /unquery
2016-12-13 03:19:00 +01:00
ailin-nemui
560283ba4e g_sequence backing for window list 2016-12-13 01:04:26 +01:00
LemonBoy
4ccffd85ff Expose 'sasl_success' to the perl side. 2016-12-12 21:41:07 +01:00
LemonBoy
91c9e871c7 Add an option to stop the connection when SASL fails. 2016-12-12 21:41:06 +01:00
ailin-nemui
618c8bd10e Merge pull request #581 from LemonBoy/set-contract
Enforce the is_node_list contract in lib-config setters.
2016-12-08 12:29:52 +01:00
ailin-nemui
964f423fed Merge pull request #570 from josephbisch/fix-issue-563
enforce check that chatnets are nodelists to handle invalid config
2016-12-08 12:11:59 +01:00
LemonBoy
7fb84b5b7d Enforce the is_node_list contract in lib-config setters.
An assertion failure is better than a segfault.
2016-11-29 23:08:45 +01:00
LemonBoy
5efb3077d5 Merge pull request #565 from ahf/bug/524
Kill bell_beeps.
2016-11-29 22:13:53 +01:00
LemonBoy
22ce6637c7 Merge pull request #577 from LemonBoy/flagz
Minor corrections to the netsplit code.
2016-11-25 21:52:42 +01:00
LemonBoy
5f0e755a00 Don't shadow the 'channel' variable when printing the netjoins.
This is the root cause of #567
2016-11-23 22:22:37 +01:00
ailin-nemui
dcffa98d46 add a static buffer for dcc received data
increased buffersize might make irssi freeze less / #159
2016-11-23 17:02:29 +01:00
LemonBoy
7574bed26c Minor corrections to the netsplit code. 2016-11-23 16:11:38 +01:00
Lauri Tirkkonen
4cbf279d88 add completion_empty_line setting 2016-11-08 16:27:38 +02:00
ailin-nemui
43934ae9ad add missing inheritance to Exec item from 3532fc46 2016-11-01 17:08:28 +01:00
Joseph Bisch
c98f5f23ea
enforce check that chatnets are nodelists to handle invalid config 2016-10-27 11:18:37 -04:00
Alexander Færøy
6a6196eebe
Kill bell_beeps.
Fixes #524
2016-10-23 21:24:12 +02:00
Alexander Færøy
bc4e2c9ade
Shorten the certificate chain output. 2016-10-23 02:51:08 +02:00
Alexander Færøy
322625b548
Only do checks for SSL_get_server_tmp_key in network-openssl.c. 2016-10-22 22:04:33 +02:00
Alexander Færøy
0a6e66f8b7
Kill do { ... } while (0); and replace it with goto's. 2016-10-22 22:04:33 +02:00
Alexander Færøy
d501a54f4f
Emit the TLS handshake finished signal before we do verification.
This patch moves the emitted "tls handshake finished" signal to before
we do validation of the given TLS certificate. This ensures that we
display certificate information before we possibly error out and
disconnects from the server.
2016-10-22 22:04:33 +02:00
Alexander Færøy
5a04430998
Kill support for DANE.
This patch removes support for DANE validation of TLS certificates.

There wasn't enough support in the IRC community to push for this on the
majority of bigger IRC networks. If you believe this should be
reintroduced into irssi, then please come up with an implementation that
does not rely on the libval library. It is causing a lot of troubles for
our downstream maintainers.
2016-10-22 22:04:33 +02:00
Alexander Færøy
f533baa191
Lift EC_KEY declaration onto the entry of the function. 2016-10-22 22:04:32 +02:00
Alexander Færøy
25824e2d3f
Lift ASN1_STRING declaration onto the entry of the function. 2016-10-22 22:04:32 +02:00
Alexander Færøy
4e170c5233
Declare variables in the beginning of the function. 2016-10-22 22:04:32 +02:00
Alexander Færøy
53d772e48b
Make sure we clean-up after ourself upon failure. 2016-10-22 22:04:31 +02:00
Alexander Færøy
5146ce9631
Add x509 certificate and public key pinning support.
This patch adds two new options to /CONNECT and /SERVER to let the user
pin either an x509 certificate and/or the public key of a given server.

It is possible to fetch the certificate outside of Irssi itself to
verify the checksum. To fetch the certificate call:

    $ openssl s_client -connect chat.freenode.net:6697 < /dev/null 2>/dev/null | \
      openssl x509 > freenode.cert

This will download chat.freenode.net:6697's TLS certificate and put it into the
file freenode.cert.

-tls_pinned_cert
----------------

This option allows you to specify the SHA-256 hash of the x509
certificate. When succesfully connected to the server, irssi will verify
that the given server certificate matches the pin set by the user.

The SHA-256 hash of a given certificate can be verified outside of irssi
using the OpenSSL command line tool:

    $ openssl x509 -in freenode.cert -fingerprint -sha256 -noout

-tls_pinned_pubkey
------------------

This option allows you to specify the SHA-256 hash of the subject public key
information section of the server certificate. This section contains both the
cryptographic parameters for the public key, but also information about the
algorithm used together with the public key parameters.

When succesfully connected to the server, irssi will verify that the
given public key matches the pin set by the user.

The SHA-256 hash of a public key can be verified outside of irssi using
the OpenSSL command line tool:

    $ openssl x509 -in freenode.cert -pubkey -noout | \
      openssl pkey -pubin -outform der | \
      openssl dgst -sha256 -c | \
      tr a-z A-Z

It is possible to specify both -tls_pinned_cert and -tls_pinned_pubkey
together.
2016-10-22 22:01:50 +02:00
Alexander Færøy
c6c2e79537
Display TLS connection information when connected to a TLS enabled server. 2016-10-22 21:58:50 +02:00
Alexander Færøy
1d101afe0d
s/SSL/TLS/ for warning strings. 2016-10-22 21:58:49 +02:00
Alexander Færøy
13f75d49e0
Simplify TLS verification error handling. 2016-10-22 21:58:49 +02:00
Alexander Færøy
b630fd1703
Populate and emit TLS_REC after TLS handshake have completed. 2016-10-22 21:58:49 +02:00
Alexander Færøy
99d017720d
Add TLS_REC.
This patch adds the TLS_REC structure. This structure is used to emit
information about the TLS handshake from the core of irssi to the
front-end layers such that we can display connection information to the
user.
2016-10-22 20:37:33 +02: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
Alexander Færøy
da67d3e8e6
Add function to convert a buffer to a colon-delimited hex string.
This patch adds binary_to_hex(), which can take an input buffer and
convert it to colon-delimited hex strings suitable for printing for
fingerprints.
2016-10-22 20:36:50 +02:00
Alexander Færøy
6300dfec71
Always build irssi with TLS support.
This patch removes the optional checks for whether to build irssi with
TLS support or not. This will allow us to ship a default configuration
file where we connect to TLS enabled IRC servers out of the box.
2016-10-16 14:55:48 +02:00
ailin-nemui
61590f31df Merge pull request #465 from LemonBoy/netsplit-print
Some small adjustments to the netsplit code.
2016-10-11 16:12:35 +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
ailin-nemui
f9fd50a357 nullptr when doing module backward compat on invalid config 2016-09-25 23:17:20 +02:00
ailin-nemui
31044ec004 Merge pull request #542 from LemonBoy/xs-add
Expose the CAP fields to the perl scripts.
2016-09-22 17:10:33 +02:00
ailin-nemui
295a4b77f0 Patches for heap corruption and missing bounds check
By Gabriel Campana and Adrien Guinet from Quarkslab.
2016-09-20 19:56:06 +02:00
ailin-nemui
b3c6cdbb91 Merge pull request #540 from LemonBoy/reset-autorun
/script reset can now also run the autorun scripts
2016-09-19 22:14:57 +02:00
LemonBoy
0e0d99587a Expose 'cap_toggle' to the perl scripts. 2016-09-15 20:38:04 +02:00
ailin-nemui
b58be939d2 Merge pull request #516 from LemonBoy/comp-file
Fix the tab completion for paths starting with ./
2016-09-13 23:29:09 +02:00
LemonBoy
21539019dd Make sure to make a copy of ERRSV content.
Otherwise we might end up showing an empty message.
Fixes #522.
2016-09-13 17:11:05 +02:00
LemonBoy
9591afcb4b Expose the CAP fields to the perl scripts. 2016-09-13 16:07:48 +02:00
LemonBoy
b2424f3193 Add a '-autorun' switch to /script reset
This way we reload all the scripts in the autorun folder.
2016-09-11 16:59:21 +02:00
LemonBoy
e4f8abc973 Merge pull request #533 from dequis/statusmess
Set the default STATUSMSG to @ instead of @+ if it's missing
2016-09-04 12:11:02 +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
ailin-nemui
c8630acbaf Merge pull request #529 from ailin-nemui/issue500
fix nick->host == NULL crash
2016-08-25 04:24:07 +02: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
LemonBoy
251d8a686a Fix an OOB access in the cutbuffer implementation. 2016-08-24 22:29:52 +02:00
ailin-nemui
681caf2b58 fix nick->host == NULL crash 2016-08-22 12:27:10 +02:00
ailin-nemui
17f4bd2060 Merge pull request #526 from ailin-nemui/ax-dummy
remove broken dummy mode
2016-08-14 23:35:41 +02:00
ailin-nemui
de11e0f4f2 remove broken dummy mode 2016-08-12 19:33:56 +02:00
ailin-nemui
b411f943a0 fix use after free in expando error 2016-08-12 18:24:58 +02:00
ailin-nemui
9ee4803770 remove curses terminal and ncurses macro 2016-08-04 10:02:28 +02:00
ailin-nemui
8b47196745 Merge pull request #517 from LemonBoy/unignore
Minor cosmetic fix in /unignore error message.
2016-07-13 15:26:37 +02:00
LemonBoy
bd4189907e Minor cosmetic fix in /unignore error message.
Reported here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577202
2016-07-12 17:38:05 +02:00
LemonBoy
dab3246db9 Fix the tab completion for paths starting with ./ 2016-07-12 16:35:43 +02:00
Tom Feist
9559a8ead9 Allow Irssi::signal_remove to work properly with coderefs 2016-07-12 12:42:15 +02:00
LemonBoy
c0f66c95ff Such draft. Very wow. 2016-06-26 21:45:03 +02:00
LemonBoy
8f5e200551 Avoid entering an endless loop while traversing the channel list 2016-06-26 21:45:03 +02:00
LemonBoy
ed06e43ec8 Some small adjustments to the netsplit code.
By making the signal handler hooked to the "print starting" event
smarter we can avoid dumping the whole netsplit stats for every
server/channel when a message arrives.

Issue #420
2016-06-26 21:45:03 +02:00
ailin-nemui
c2c32e3955 check for NULL in statusbar_more_updated
fixes crash due to invalid access of active_win members when the more
indicator is triggered without an active window
2016-06-25 21:33:50 +02:00
ailin-nemui
f264a78947 Merge pull request #496 from ailin-nemui/comp
completion fixes
2016-06-24 10:05:15 +02:00
LemonBoy
798ce006c2 Merge pull request #498 from vague666/add_modify_functions
Add modify to /channel, /server and /network
2016-06-21 22:46:52 +02:00
Jari Matilainen
a4223a3b2e use TRUE/FALSE in if statements for gboolean 2016-06-21 22:05:21 +02:00
Jari Matilainen
2bb913f0c1 Fix minor nits 2016-06-19 16:35:13 +02:00
Jari Matilainen
4292dbd202 Add command_set_options for modify commands to allow completion 2016-06-18 18:47:11 +02:00
Jari Matilainen
79e30405e6 Let ADD still work as modify 2016-06-18 18:02:04 +02:00
Jari Matilainen
1d2113a638 Add /server modify SYNTAX 2016-06-18 17:53:35 +02:00
Jari Matilainen
421288cf50 Add /network modify 2016-06-18 17:52:47 +02:00
Jari Matilainen
1dd1dde1d4 Add /server modify 2016-06-18 17:52:26 +02:00
Jari Matilainen
92a2384ab0 Add /channel modify 2016-06-18 17:51:58 +02:00
ailin-nemui
77ad62fadb completion fixes 2016-06-16 21:30:46 +02: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
2da49e3ca6 Don't crash when the key isn't found. 2016-06-13 22:14:08 +02:00
LemonBoy
862729d7a3 Add a completion_match_case setting. 2016-06-13 22:13:43 +02:00
LemonBoy
78c1c1518a Be smart about case-matching the nicks.
If the prefix contains an uppercase letter then don't use the
case-insensitive search functions.
2016-06-13 21:55:20 +02:00
ailin-nemui
52ced0728b Merge pull request #492 from LemonBoy/enum
Enum setting implementation
2016-06-13 21:47:39 +02:00
LemonBoy
5c8423a08c Add a space after the comma when listing the options. 2016-06-13 20:27:37 +02:00
LemonBoy
439e21f127 Use ; as separator instead of , 2016-06-13 14:07:04 +02:00
LemonBoy
9a30ab53df Move the validation of the CHOICE setting value
Also, use a FORMAT to show the error message.
2016-06-13 14:03:00 +02:00
dequis
9ea155f8df servers-reconnect: pass unix_socket attribute to new connection
Trying to /reconnect unix sockets turned them into inet.
2016-06-12 20:28:06 -03:00
LemonBoy
6f795f020d Strip the surrounding whitespace. 2016-06-12 23:39:22 +02:00