Sébastien Helleu
b61dca7d2d
tests: add unit tests on command /allbuf
2025-11-10 09:04:13 +01:00
Sébastien Helleu
4232123ca3
tests: add macros to test errors with commands
2025-11-10 09:04:13 +01:00
Sébastien Helleu
07ef353b1b
irc: remove temporary servers and option irc.look.temporary_servers
2025-11-01 09:15:54 +01:00
Sébastien Helleu
93d73d234f
relay/api: consider boolean/long query string parameters as invalid if they are empty
2025-10-26 18:12:02 +01:00
Sébastien Helleu
d05b83d03f
relay/api: return an error 401 when header "x-weechat-totp" is received with empty value
2025-10-26 10:11:10 +01:00
Sébastien Helleu
0009732f78
relay/api: return an error 401 when header "x-weechat-totp" has an invalid value
2025-10-26 09:19:43 +01:00
Sébastien Helleu
e637e0de1c
relay/api: return an error 400 when URL parameters "nicks", "lines" and "lines_free" have an invalid value
2025-10-26 08:07:23 +01:00
Sébastien Helleu
58c873809b
relay/api: return an error 400 when URL parameter "colors" has an invalid value
2025-10-26 07:22:10 +01:00
Sébastien Helleu
72b2242135
irc: send SASL username with mechanism EXTERNAL ( closes #2270 )
...
The SASL username is sent if set, otherwise "+" is still sent.
2025-10-12 16:11:33 +02:00
Sébastien Helleu
b066f713d7
tests: fix memory leak in tests on SASL PLAIN authentication mechanism
2025-10-12 16:07:52 +02:00
Sébastien Helleu
21a958423e
logger: change default time format to "%@%F %T.%fZ" (UTC)
2025-08-31 12:15:33 +02:00
Sébastien Helleu
1c09118fe1
api: allow lower characters "t" and "z" in function util_parse_time
...
The following dates are now parsed with the same result:
2025-08-30T20:12:55.866643Z
2025-08-30t20:12:55.866643z
2025-08-31 12:15:33 +02:00
Sébastien Helleu
5acbfe9b7d
api: fix parsing of date/times with timezone offset in function util_parse_time
2025-08-31 12:15:33 +02:00
Sébastien Helleu
7980a6d100
api: add support of date like ISO 8601 but with spaces in function util_parse_time
...
So for example the format "2024-01-04 22:01:02.123456 +0100" is supported in
addition to ""2024-01-04T22:01:02.123456+0100".
2025-08-31 12:15:33 +02:00
Emil Velikov
f48e6ee81d
Bump required (lib)gcrypt to v1.8.0
...
Bump the requirement to v1.8.0, which means we can remove ~70% of the
ifdef guard.
It was released over 8 years ago, with 3 new feature releases since
then and dozen of bugfix releases in the 1.8 branch.
The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 1.8.5 and 1.8.7 respectively.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com >
2025-08-31 10:36:20 +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
4348036e2e
tests: remove duplicated "HTTP/1.1" in some relay API tests
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
a6e859b7ff
tests: add test with a float number using a lot of decimals in calculation of expression
...
This test validates the fix made in commit
5b4820ab06 and will prevent regression with such
numbers.
2025-06-07 09:45:15 +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
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
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
51d24fd2da
api: add function file_compare (issue #2250 )
2025-05-07 20:44:48 +02:00
Sébastien Helleu
a1cbe63a42
tests: move CMake file, main C++/headers for tests and scripts to unit directory
2025-05-05 13:18:34 +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
2475f20cb7
all: move description of C files below the copyright and license
2025-03-31 11:47:49 +02:00
Sébastien Helleu
3a6ac9ee76
all: add SPDX license tag
2025-03-31 07:49:26 +02:00
Sébastien Helleu
d8987a1678
all: replace Copyright lines by SPDX copyright tag
2025-03-30 14:47:12 +02:00
Sébastien Helleu
caa7af253a
tests: add tests on function util_strftimeval with microseconds < 0 or > 999999
2025-03-17 08:12:33 +01:00
Sébastien Helleu
9fe5fa23a0
core: convert "long long" to "unsigned long long" in functions util_get_microseconds_string and util_parse_delay
2025-03-16 11:13:25 +01:00
Sébastien Helleu
547e2b934e
core: update copyright dates
2025-02-01 23:13:18 +01:00
Sébastien Helleu
d302294723
relay/api: always return a body with field "error" in error responses
2025-01-07 07:52:09 +01:00
Sébastien Helleu
60422ca6b1
relay: remove extra space in JSON authentication error
2025-01-07 07:28:45 +01:00
Sébastien Helleu
9d3388b09e
relay/api: use cjson lib to return errors
2025-01-07 07:23:55 +01:00
Sébastien Helleu
d10af1037b
relay/api: use cjson lib to build JSON body of handshake request
2025-01-07 07:18:01 +01:00
Nils
c6c420c698
relay: add completion resource
2025-01-05 14:54:07 +01:00
Sébastien Helleu
732f24b6ba
core: add command /pipe
2024-12-16 13:39:14 +01:00
Trygve Aaberge
11faf85402
tests: add test for combining request headers
2024-11-24 16:15:35 +01:00
Trygve Aaberge
a414fb9da5
tests: add tests for auth via Sec-WebSocket-Protocol
2024-11-24 16:00:25 +01:00
Sébastien Helleu
244595d94f
api: add support of flags in functions hook_signal_send and hook_hsignal_send
...
For now the only supported flag is:
- "stop_on_error": stop execution of callbacks immediately after an
error (ie return code of callback is WEECHAT_RC_ERROR) and return this code
(by default execute all callbacks and return the last return code, or return
WEECHAT_RC_EAT immediately if a callback returns this)
Example:
hook_signal_send("[flags:stop_on_error]my_signal", WEECHAT_HOOK_SIGNAL_STRING, "test");
2024-11-24 10:29:32 +01:00
Sébastien Helleu
26e16fdea7
tests: add extra tests on function string_split
...
New tests:
- split empty string
- standard split with only separators in string
- standard split with only separators in string and strip separators
2024-10-21 08:23:55 +02:00
Sébastien Helleu
50a9c88b79
core: check that version is not NULL or empty string in function util_version_number
2024-10-21 08:23:55 +02:00
Sébastien Helleu
bca7c7438a
api: add special value - (hyphen-minus) in options of function command_options to prevent execution of commands (issue #2199 )
2024-10-13 11:15:10 +02:00
Sébastien Helleu
ec78084f49
tests: add tests on function input_data
2024-10-12 21:04:13 +02:00
Josh Soref
dcd62f7ee6
spelling: shift
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Josh Soref
7f93f81a82
spelling: separator
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Josh Soref
87f2bb0a23
spelling: passphrase
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00