1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00
Commit Graph

4278 Commits

Author SHA1 Message Date
dequis
9dd836b876 Fix "discards ‘const’ qualifier" warnings 2018-08-24 02:11:22 -03:00
ailin-nemui
071ada830b up abi 2018-08-23 14:21:37 +02:00
coypu@sdf.org
610ab2dafa Use-after-frees
Hi folks!

I tried clang-static-analyzer on irssi 1.1.1, it seems like it
finds some things. Here's a diff, but there might be more that you would
want to check, or choose to work differently.

(in special-vars.c, ret is commands->data sometime)

I hope it's not too much trouble if reported as a confidential bug.
Thanks.
2018-08-23 14:13:48 +02:00
ailin-nemui
b2a429bfb4 update line cache on switching wcwidth implementation 2018-08-23 14:03:53 +02:00
ailin-nemui
3ef0b9b3d0 move "auto" to default instead 2018-08-23 14:03:16 +02:00
ailin-nemui
b95ce3e812 add julia's utf8proc wcwidth implementation 2018-08-23 13:23:35 +02:00
dequis
24f1ed7edb irc-cap: Don't show warning on CAP LIST response 2018-08-23 03:22:30 -03:00
dequis
0d8632943d Add a wrapper of wcwidth() that picks the best implementation
This adds a i_wcwidth() function that replaces mk_wcwidth(), and a
'wcwidth_implementation' setting to pick which one it wraps.

Values:

- old: uses our local mk_wcwidth() which implements unicode 5.0
- system: uses the libc-provided wcwidth(), which may be better or worse
  than ours depending on how up to date the system is.
- auto: tests the system one against two characters that became
  fullwidth in unicode 5.2 and 9.0 respectively. If either of them pass,
  pick the system implementation, otherwise pick ours.

It defaults to auto.

mk_wcwidth() is still preferable in some cases, since the way it uses
ranges for fullwidth characters means most CJK blocks are covered even
if their characters didn't exist back then.

The "system" implementation is also wrapped to never return -1, but to
assume those unknown characters use one cell. Quoting the code:

    /* Treat all unknown characters as taking one cell. This is
     * the reason mk_wcwidth and other outdated implementations
     * mostly worked with newer unicode, while glibc's wcwidth
     * needs updating to recognize new characters.
     *
     * Instead of relying on that, we keep the behavior of assuming
     * one cell even for glibc's implementation, which is still
     * highly accurate and less of a headache overall.
     */
2018-08-23 02:30:26 -03:00
ailin-nemui
af1e4d6e34 initialise the line to zeros 2018-08-21 09:21:23 +02:00
ailin-nemui
a19b503a31 properly record line info on empty lines 2018-08-21 00:31:12 +02:00
Joseph Bisch
4f5f62ac63 Add server-fuzz to fe-fuzz
Based on test-796.c in the tests directory.
2018-08-15 11:11:09 -04:00
ailin-nemui
817179a760
Revert "Flag topic as unset if it is zero length" 2018-08-13 14:43:25 +02:00
Lukas Waymann
7d3eb47ab5 Fix potential rename(3) across file systems
Make sure the temporary file in the `config_write` function is created
on the same file system as the file we `rename` it to later.
2018-08-12 10:55:47 +00:00
Lukas Waymann
764f8215a9 Fix /save replacing symlinks with regular files
A side-effect of 8deb618 is that `/save` may replace configuration files
that are symlinks with regular files.  Fix this by resolving all
symlinks before renaming the temporary file.
2018-08-12 07:22:14 +00:00
David Phillips
10f6326649 Redraw on SIGWINCH when screen size hasn't changed
Some programs and users send SIGWINCH as a request for the client to redraw
in the event of session detachment/reattachment (e.g. abduco). A well-formed
terminal will only send SIGWINCH when the window size has changed, so there
is no need to optimise this case out.
2018-08-06 14:58:56 +12:00
Doug Freed
f3909b8bcb
core/ignore: fix #900 2018-08-03 17:07:06 -04:00
ailin-nemui
0c94d44f52
Merge pull request #892 from dwfreed/fix-ignore-flags
core/ignore: fix ignore_match_level handling of flag levels
2018-08-02 13:42:24 +02:00
ailin-nemui
ffd7ecc8bf
Merge pull request #897 from horgh/horgh/topic-unset
Flag topic as unset if it is zero length
2018-07-31 09:34:15 +02:00
dequis
b114b11e36 channel_change_topic: change one strlen == 0 to *str == '\0' 2018-07-30 23:45:56 -03:00
ailin-nemui
c7e50f48e5
Merge pull request #886 from vague666/set_item_format
remove = from format because people get confused by it
2018-07-25 11:32:06 +02:00
Will Storey
15840ac27b If we receive a 0 length topic, record it as unset
Fixes #888.

Previously we showed that there was a topic set when using /topic, just
an empty one. This was different than how we show such topics when
initially joining a channel. Now we say that the topic is unset in both
cases.
2018-07-24 18:45:22 -07:00
Will Storey
0e187cf9cf Fix typo in comment 2018-07-24 18:29:31 -07:00
Janik Rabe
4f45828ff3
Keep errstr set to NULL if errno is not set
Don't use errno if it is not set and show the default error message
instead. This prevents messages like "SSL handshake failed: Success"
from being shown.
2018-07-18 21:12:38 +03:00
Doug Freed
d84a24444f core/ignore: fix ignore_match_level handling of flag levels 2018-06-29 09:00:38 -04:00
vague666
1ab679bf32 remove = from format because people get confused by it 2018-06-14 20:07:43 +02:00
vague666
ba2554dd14 missing space 2018-06-09 05:55:25 +02:00
vague666
d2e1caf720 simplifying code 2018-06-07 15:17:46 +02:00
vague666
1547248e94 simplify code 2018-06-06 11:03:44 +02:00
vague666
ac3af3fb56 these were bitflags 2018-06-06 10:00:38 +02:00
vague666
db3b671328 Added HIDDEN level to ignores 2018-06-05 15:29:40 +02:00
ailin-nemui
631650bd8a
Revert "record line info on empty lines" 2018-05-07 21:22:43 +02:00
ailin-nemui
e19d6ee219
Merge pull request #873 from ailin-nemui/empty_lines
record line info on empty lines
2018-04-24 13:58:25 +02:00
ailin-nemui
0caf884e92
Merge pull request #871 from dequis/atomic-config-write
Make config_write more atomic to prevent truncation when out of space
2018-04-24 13:58:15 +02:00
ailin-nemui
34b31e8451 record line info on empty lines 2018-04-16 16:22:04 +02:00
dequis
8deb6182c6 Make config_write more atomic to prevent truncation when out of space
This is modeled after glib's g_file_set_contents. It doesn't use that
function directly because the writing is done with GIOChannel
streaming-like writes and g_file_set_contents expects the whole thing to
be in-memory.

Main differences with g_file_set_contents:

- complete lack of win32 special casing (cygwin/WSL should work though)
- no fallocate() (linux only, but we don't know the size upfront, anyway)
- always calls fsync (glib skips it on btrfs or when not overwriting)

Other than that, it's the same old mkstemp + fsync + rename.
2018-04-08 15:52:09 -03:00
dequis
d0151fd5a2 Add fe-cap to show messages for CAP-related events in the UI
Replaces cap.pl
2018-04-08 01:26:11 -03:00
dequis
af5ee997e7 Add "server cap req" signal, emitted before requesting caps 2018-04-08 01:24:48 -03:00
ailin-nemui
b2b1ac6708
Merge pull request #866 from ailin-nemui/reconnects
This is a simple change which might fix #130

The lookup_servers are also disconnected if the lookup/SSL handshake doesn't succeed in time. I'm not perfectly sure if this is the master fix but it does seem to be an issue that servers can be stuck in lookup, especially for SSL. See the issue for a reproducer
2018-04-06 10:50:58 +02:00
ailin-nemui
8bf2162053
Merge pull request #858 from ailin-nemui/sbar
change the statusbar commands so that no accidential status bars are created
2018-04-02 08:36:53 +02:00
ailin-nemui
0c1db8f2ae
Merge pull request #854 from irssi/ahf/otr
OTR support, take 2
2018-03-31 13:04:35 +02:00
dequis
4501917cae otr: rename module.c to otr-module.c 2018-03-31 01:46:34 -03:00
ailin-nemui
c08685a1a3 also reconnect lookup_servers 2018-03-29 23:24:13 +02:00
ailin-nemui
a3b9e2370f up abi 2018-03-29 22:00:40 +02:00
dequis
7d7c6975ed otr: add target param to the unencrypted 'message private' signal
Same case as the previous commit.
2018-03-28 23:36:03 -03:00
dequis
dd7dc7ca7d otr: fix missing 'target' param in 'message private' signal
Fixes warnings like these on '/msg yourself'

-!- Irssi: critical privmsg_get_query: assertion 'nick != NULL' failed
-!- Irssi: critical query_find: assertion 'nick != NULL' failed
2018-03-28 23:06:47 -03:00
dequis
b52cf1015e otr: add KEY_GEN_STARTED state to avoid starting it twice
Fun race condition there, got this when testing with the jabber
xmlconsole open in bitlbee
2018-03-28 22:40:17 -03:00
Dorian Harmans
17920ab5aa Merge remote-tracking branch 'upstream/master' 2018-03-26 22:50:54 +02:00
ailin-nemui
7fc59d2d10
Merge pull request #862 from ailin-nemui/line_is_null
fix a crash when trying to append to a NULL line
2018-03-26 12:46:04 +02:00
Dorian Harmans
25a44dacf4 fix build with LibreSSL 2.7.0 2018-03-23 21:35:35 +01:00
ailin-nemui
138eca0749 fix build 2018-03-20 18:13:26 +01:00
ailin-nemui
ee04cd503f add disabled txt 2018-03-20 17:59:11 +01:00
ailin-nemui
977c2c0a0d refactor common parts 2018-03-20 17:53:03 +01:00
ailin-nemui
501c150ec2 make new status bar actually work 2018-03-20 17:39:08 +01:00
ailin-nemui
7d99ff05cd
Merge pull request #803 from ailin-nemui/bug-796-test
Postpone server cleanup until after unref
2018-03-20 10:30:01 +01:00
ailin-nemui
6ffbd0ab54
Merge pull request #859 from ailin-nemui/delkeys
make default keybinds deletable
2018-03-19 16:23:27 +01:00
ailin-nemui
c8191b3315 abi bump 2018-03-19 10:35:42 +01:00
ailin-nemui
61c58b7690 actually check which of add or modify was called 2018-03-19 10:35:39 +01:00
ailin-nemui
d845ee7361 change the statusbar commands so that no accidenal status bars are created 2018-03-19 09:59:22 +01:00
ailin-nemui
c7ca8102c0 fix a crash when trying to append to a NULL line
reported by @vague666
2018-03-17 13:36:38 +01:00
ailin-nemui
65a139aa9e move no window printing code 2018-03-16 12:54:15 +01:00
Alexander Færøy
8d07f52bae Add ABI check for otr_core module. 2018-03-15 14:01:50 +01:00
ailin-nemui
b7906b8706 in fact hidden levels should not be re-set when you run /set 2018-03-15 10:06:29 +01:00
ailin-nemui
7ec6c500b4 make default keybinds deletable 2018-03-12 17:46:26 +01:00
ailin-nemui
575daf4af7
Merge pull request #852 from dequis/document-cat-seek
Document second parameter (seek position) of /cat command
2018-03-10 13:11:39 +01:00
LemonBoy
76d958a87f More g_strcmp0 -> g_ascii_strcasecmp 2018-03-09 17:36:28 +01:00
LemonBoy
fb9f5174c2 Compare channels/networks fields case-insensitively
Fixes #856
2018-03-08 20:35:00 +01:00
Alexander Færøy
016b42baea Add OTR support.
This patch adds support for the OTR protocol to irssi. This is an import
of the external irssi-otr project that we are now taking over
maintership for.

Major thanks to the original authors of Irssi-OTR: Uli Meis and David
Goulet. Thanks to the OTR community in #OTR on OFTC, thanks to everyone
who have helped testing the patches and submitted UI suggestions.
2018-02-26 23:32:57 +01:00
dequis
097a9f4988 Document second parameter (seek position) of /cat command 2018-02-16 10:09:48 -03:00
ailin-nemui
203f6c5329 also unblock theme elements when processing finished 2018-02-16 13:46:29 +01:00
ailin-nemui
e289d34b9a limit alignment padding to a screenful
Credit to Oss-Fuzz
2018-02-14 15:04:24 +01:00
ailin-nemui
a6fcd5432e improve padding performance
Credit to Oss-Fuzz
2018-02-13 12:31:22 +01:00
ailin-nemui
c01f6df957
Merge pull request #844 from CatboxParadox/perms
dcc get shouldn't fail when file attrs can't be changed
2018-02-13 11:10:21 +01:00
Nei
b0d9cb33cd Merge branch 'security' into 'master'
Security

See merge request irssi/irssi!34
2018-02-13 09:51:22 +00:00
Staron, Martin
3cbcb4fe85 dcc get shouldn't fail when file attrs can't be changed 2018-02-13 08:15:39 +01:00
ailin-nemui
5c5ed64180 try to make sure the server is still good enough to call ischannel when printing netsplit/join 2018-02-09 13:02:00 +01:00
ailin-nemui
946876b1e9
Merge pull request #843 from ailin-nemui/glib238
restore compat with glib <2.40
2018-02-09 11:49:23 +01:00
ailin-nemui
16912e1a91 restore compat with glib <2.40 2018-02-08 14:41:08 +01:00
ailin-nemui
e32e9d63c6 Do not read beyond end of escaped string
Credit to OSS-Fuzz
2018-02-08 14:11:23 +01:00
ailin-nemui
02712942e0
Merge pull request #835 from ailin-nemui/theme-stack
protect theme recursion
2018-02-07 21:23:39 +01:00
ailin-nemui
1e6d787401 ensure cap_supported is existent yet 2018-02-07 11:07:22 +01:00
Nei
12483c688a Merge branch 'sasl-timeout' into 'security'
Fix Sasl timeout error

See merge request irssi/irssi!33
2018-02-06 06:46:11 +00:00
Nei
a73659e0ea Merge branch 'soperise' into 'security'
Soperise

See merge request irssi/irssi!32
2018-02-06 06:45:54 +00:00
Nei
41e2b535ef Merge branch 'nonick' into 'security'
please give us nicks

See merge request irssi/irssi!31
2018-02-06 06:45:32 +00:00
ailin-nemui
f8fbc1e1ab
Merge pull request #775 from LemonBoy/caps_kv
CAP 3.2 support
2018-02-05 22:29:35 +01:00
ailin-nemui
8183180613
Merge pull request #764 from GinjaNinja32/colorful-input
Add color support for input bar
2018-02-05 22:28:08 +01:00
ailin-nemui
cfcc021c81
Merge pull request #824 from dequis/more-netsplit-revert
Revert more of the netsplit print optimisation to fix crashes
2018-02-05 22:26:32 +01:00
ailin-nemui
3c1bc5f916
Merge pull request #836 from ailin-nemui/resize
Fix resizing of windows when used incorrectly
2018-02-05 22:25:33 +01:00
ailin-nemui
442f6f08b4
Merge pull request #837 from ailin-nemui/no-show
check the error condition of mainwindow_create
2018-02-05 22:24:17 +01:00
ailin-nemui
b33ce255a9 check for negative bound 2018-02-04 11:34:20 +01:00
ailin-nemui
c25e122149
Merge pull request #822 from Manishearth/autocomplete-colon
Insert colons after completing nicks preceded by a list of other autocompleted nicks
2018-02-04 11:28:25 +01:00
ailin-nemui
9c494a88a3
Merge pull request #831 from ailin-nemui/openssl-x509
Do not use X509_STORE on OpenSSL < 1.0.2
2018-02-04 11:27:02 +01:00
ailin-nemui
2185c4ddb3 up abi 2018-02-03 23:19:27 +01:00
ailin-nemui
9072e98819 change color -> extents (malloc based) 2018-02-02 13:56:56 +01:00
ailin-nemui
84f03e0146 do not reuse sasl timeout 2018-02-02 11:43:23 +01:00
ailin-nemui
5b5bfef035 check the error condition of mainwindow_create 2018-02-02 10:05:37 +01:00
ailin-nemui
f0bd434eb0 stop the madness 2018-02-02 09:50:08 +01:00
ailin-nemui
4c662acf95 another replaces fix
Credit to OSS-Fuzz
2018-02-01 14:19:40 +01:00
ailin-nemui
12360fb2c0 protect theme recursion 2018-02-01 10:21:31 +01:00
ailin-nemui
8028dcff93
Merge pull request #830 from g-elfling/master
Add Shift-Tab completion to gui-readline
2018-01-30 11:20:40 +01:00
ailin-nemui
126189bb37 we probably should not try to replace replaces
Credit to OSS-Fuzz
2018-01-29 09:28:55 +01:00