Sébastien Helleu
c447013caf
irc: fix colors in ban mask (message 367) and quiet mask (message 728) (issue #2286 )
2025-11-22 10:06:48 +01:00
Sébastien Helleu
3a629e08fa
api: fix file descriptor leak in hook_url ( closes #2284 )
...
This can happen after a timeout or if the hook is removed during the transfer.
2025-11-15 20:15:16 +01:00
Sébastien Helleu
1c73310dd1
core: set max version for Curl symbol CURLOPT_KRBLEVEL
2025-11-15 17:47:18 +01:00
Sébastien Helleu
a797e2bf70
relay/api: fix crash when an invalid HTTP request is received from a client
...
When invalid data is received (not an HTTP request), client->http_req->method
is NULL, so we have to check it's not NULL before comparing it to the supported
methods.
This fixes a regression introduced in commit
93ec10b563 .
2025-08-16 21:21:14 +02:00
Sébastien Helleu
be78d185ea
relay/api: bump API version to 0.4.1
2025-07-02 20:52:42 +02:00
Sébastien Helleu
58067431de
relay/api: process HTTP request received as soon as a NULL char is received
...
This fixes the API probe made by schemathesis, so it detects immediately that
such NULL byte is not allowed by WeeChat, instead of timing out after 10
seconds:
✅ API capabilities:
Supports NULL byte in headers: ✘
2025-07-02 20:32:09 +02:00
Sébastien Helleu
902332c3e6
relay/api: move resource bodies into their paths in OpenAPI document
2025-07-02 20:32:09 +02:00
Sébastien Helleu
0b82429b39
relay/api: add example of value for the parameter buffer_id in OpenAPI document
2025-07-02 20:32:09 +02:00
Sébastien Helleu
8b2165d441
relay/api: fix example of ping data in OpenAPI document
2025-07-02 20:32:09 +02:00
Sébastien Helleu
fca2412424
relay/api: fix example of completion list in OpenAPI document
2025-07-02 20:32:09 +02:00
Sébastien Helleu
d279a80733
relay/api: remove extra double quote in example of line date (OpenAPI document)
2025-07-02 20:32:09 +02:00
Sébastien Helleu
4444addf4d
relay/api: fix operationId of completion resource in OpenAPI document
2025-07-02 20:32:09 +02:00
Sébastien Helleu
4ce74403dc
relay/api: fix typo in OpenAPI document
2025-07-02 20:32:09 +02:00
Sébastien Helleu
1db29cb1ed
relay/api: reject any invalid or unknown password hash algorithm in handshake resource
2025-07-02 20:32:09 +02:00
Sébastien Helleu
d8baabd250
relay/api: use "buffer_name" first if received, then "buffer_id" in completion and input resources
...
This fixes some tests done by shemathesis, which sends "buffer_id" to
0 (unknown buffer) and "buffer_name" to a valid buffer name.
2025-07-02 20:32:09 +02:00
Sébastien Helleu
93ec10b563
relay/api: return HTTP error 405 (Method Not Allowed) when the method received is not allowed
2025-07-02 20:32:09 +02:00
Sébastien Helleu
323f80e914
core: add option weechat.completion.partial_completion_auto_expand ( closes #2253 )
2025-06-30 18:52:58 +02:00
Sébastien Helleu
56903738b5
core: always enable partial completion for templates in option weechat.completion.partial_completion_templates (issue #2253 )
...
Previous behavior was to reverse the partial completion, which was confusing
when option like weechat.completion.partial_completion_command_arg was enabled
as well.
2025-06-30 18:52:58 +02:00
Sébastien Helleu
6d45a69f39
core: set max version for Curl symbol CURLOPT_SSL_FALSESTART
2025-06-21 20:30:05 +02:00
Sébastien Helleu
34f2e6cdd0
core: add script name in output of /debug hooks <plugin>
2025-06-08 16:36:46 +02:00
Albert Lee
e8ce75f20c
core: avoid dynamic format strings for Clang -Werror=format-security
2025-05-25 09:26:10 +02:00
Albert Lee
47f7518c1f
gui: use NCURSES_CFLAGS if available
2025-05-25 09:26:08 +02:00
Albert Lee
9a9a262ea1
python: use built-in CMake FindPython module from CMake 3.12 or higher
2025-05-25 09:19:05 +02:00
Albert Lee
7fb3ca6686
core: always define _XPG4_2 and __EXTENSIONS__ on Solaris/illumos
2025-05-25 09:06:51 +02:00
Albert Lee
e98a32373e
core: check if res_init requires linking with libresolv
2025-05-25 09:05:42 +02:00
Albert Lee
69d3787b5e
core: improve support for non-macro htonll and htobe64
2025-05-25 09:03:48 +02:00
Albert Lee
48568edfe0
lua: use LUA_CFLAGS from pkg-config
2025-05-22 21:02:58 +02:00
Albert Lee
d7b26e88b8
core: include pthread.h for pthread types
2025-05-22 21:02:53 +02:00
Sébastien Helleu
927a50e366
core, plugins: replace "%p" by "%lx" in calls to sscanf
2025-05-18 22:17:29 +02:00
Sébastien Helleu
d0c00f7db2
Revert "core, plugins: replace "%lx" by "%p" in calls to sscanf"
...
This reverts commit e64ab3c675 .
This was causing incorrect conversion of strings "0x..." to pointers on systems
like Solaris/illumos.
And as a side effect, buffers were sometimes empty in weechat relay clients
like glowing-bear.
2025-05-18 22:17:16 +02:00
Sébastien Helleu
9783256649
relay/api: use specifier %@ for times formatted by util_strftimeval
2025-05-18 22:15:39 +02:00
Sébastien Helleu
8106db400d
core: add support of specifier %@ for UTC time in function util_strftimeval
2025-05-18 22:15:06 +02:00
Sébastien Helleu
7b674c2618
core: add extra checks in function eval_string_range_chars
...
This is done in addition to changes made in commit
d475c16671 to fix the buffer overflow, caused by
the call to function utf8_next_char.
2025-05-11 10:26:17 +02:00
Sébastien Helleu
d475c16671
core: fix buffer overflow in function utf8_next_char and return NULL for empty string
...
Now the function utf8_next_char with an empty string returns NULL instead of
the next char, which is most of the time after an allocated buffer.
And the function utf8_char_size with an empty string now returns 0 instead of
1.
This indirectly fixes a buffer overflow in function eval_string_range_chars
when the input string is empty (for example when doing `/eval -n ${chars:}`).
2025-05-10 20:53:04 +02:00
Sébastien Helleu
6ecd9e66bf
core: fix buffer overflow in function eval_string_base_encode
2025-05-10 15:28:41 +02:00
Sébastien Helleu
9d37159a6b
core: use dynamic string in function string_replace_with_callback
2025-05-10 15:26:12 +02:00
Sébastien Helleu
aa54d3653c
core: fix buffer overflow in function eval_syntax_highlight_colorize
2025-05-10 15:26:09 +02:00
Sébastien Helleu
1d808a1f1c
core: fix buffer overflow in function util_parse_time
2025-05-08 19:09:18 +02:00
Sébastien Helleu
2bc290b6ed
core: fix integer overflow and return "unsigned long" in function util_version_number
2025-05-08 18:45:39 +02:00
Sébastien Helleu
f6cace609c
core: fix memory leak in function util_parse_delay
2025-05-08 18:12:11 +02:00
Sébastien Helleu
d74fc99fe1
core: write configuration files on disk only if there are changes ( closes #2250 )
2025-05-07 20:44:54 +02:00
Sébastien Helleu
51d24fd2da
api: add function file_compare (issue #2250 )
2025-05-07 20:44:48 +02:00
Sébastien Helleu
ca6035f754
core: fix integer overflow in base32 encoding/decoding
2025-05-05 20:43:21 +02:00
Sébastien Helleu
5b4820ab06
core: fix integer overflow with decimal numbers in calculation of expression
2025-05-05 20:25:41 +02:00
Sébastien Helleu
ceb6a007ff
core: add missing empty line
2025-05-05 13:18:35 +02:00
Sébastien Helleu
5b62cb6451
buflist: add variables ${number_zero} and ${number_zero2} (zero-padded buffer number)
2025-05-04 09:28:03 +02:00
Sébastien Helleu
683fa2f585
irc: add support of strikethrough color attribute (using half bright) ( closes #2248 )
...
As ncurses doesn't support strikethrough, the text is rendered as half
bright (WeeChat color: "dim").
2025-04-26 14:10:43 +02:00
Sébastien Helleu
0e777fef4e
core: update example in /help key
2025-04-25 18:12:59 +02:00
Sébastien Helleu
41f96c6494
core: fix write of weechat.log to stdout with weechat-headless --stdout ( closes #2247 )
2025-04-15 08:11:39 +02:00
Sébastien Helleu
d0babe8679
core: add refresh of window title on buffer switch, when option weechat.look.window_title is set
2025-04-11 19:30:32 +02:00