1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00
Commit Graph

13773 Commits

Author SHA1 Message Date
Sébastien Helleu e540d7a2cf relay/irc: fix timing attack on PASS command (GHSA-vhv8-g2r9-cwcc)
The IRC relay protocol's PASS handler compared the server password with
the client-supplied value using strcmp, leaking the password byte-by-byte
via response timing. This is the same class of bug fixed for the api and
weechat protocols, on a separate code path that did not go through
relay_auth_check_password_plain.

Extract the HMAC-then-constant-time-compare logic from
relay_auth_check_password_plain into relay_auth_password_equals, then
use it in both the plain-auth wrapper and the IRC PASS handler.
2026-05-31 09:16:36 +02:00
Sébastien Helleu 6948aea626 relay: fix timing attack on password authentication (GHSA-vhv8-g2r9-cwcc)
The relay authentication used non-constant-time comparisons (strcasecmp,
strcmp) to verify password hashes and plaintext passwords, allowing an
attacker to derive the expected hash byte-by-byte from response timing
and then authenticate without knowing the password.

- SHA/PBKDF2 hex hash comparisons: normalize the client-supplied hash to
  uppercase and compare in constant time over the fixed expected length.
- Plaintext password comparison: HMAC-SHA256 both passwords with a fresh
  per-call random key and compare the fixed-size MACs in constant time,
  hiding both per-byte timing and the password length.

Add string_memcmp_constant_time helper in core, exposed via the plugin
API. Bump WEECHAT_PLUGIN_API_VERSION accordingly.
2026-05-31 09:16:15 +02:00
Sébastien Helleu 5dbb96b66a relay: limit size of decompressed websocket frame to prevent memory exhaustion (GHSA-v2v4-45wm-5cr3)
An authenticated relay client using the permessage-deflate websocket
extension could send a small compressed frame that decompresses to an
unbounded amount of data, exhausting all memory and crashing WeeChat.

The output buffer in relay_websocket_inflate is now capped to
WEBSOCKET_INFLATE_MAX_SIZE: frames decompressing beyond this limit are
rejected and the connection is closed.
2026-05-31 09:16:06 +02:00
Sébastien Helleu 4fdcbf8f93 irc: fix description of info "irc_nick_from_host"
This fixes the following warning from xgettext:

src/plugins/irc/irc-info.c:1361: warning: Message contains an embedded email address.  Better move it out of the translatable string, see https://www.gnu.org/software/gettext/manual/html_node/No-embedded-URLs.html
2026-05-30 15:36:26 +02:00
Sébastien Helleu e4b70ad252 core: update translations 2026-05-30 14:00:43 +02:00
Sébastien Helleu d7fd2b7b0b core: define author name/email as constants
This fixes the following compiler warning:

src/core/core-args.c:180: warning: Message contains an embedded email address.  Better move it out of the translatable string, see https://www.gnu.org/software/gettext/manual/html_node/No-embedded-URLs.html
2026-05-30 13:39:45 +02:00
Sébastien Helleu 73cf57742e doc: make pygmentize optional at build time
If pygmentize is not found, the build now emits a CMake warning and
proceeds with an empty dark theme stylesheet rather than aborting.
A non-zero exit from pygmentize is also downgraded from SEND_ERROR to
WARNING for the same reason. This restores the pre-existing behavior
where the documentation could be built without any pygments tooling
installed (Asciidoctor then renders code blocks as plain text).
2026-05-24 18:03:12 +02:00
Sébastien Helleu bf7b8484cd doc: switch syntax highlighting to automatic light/dark theme with bevel on code blocks
Syntax highlighting now follows the user's `prefers-color-scheme`:

- Light theme uses the pygments `default` style, embedded by Asciidoctor as before.
- Dark theme uses the pygments `monokai` style, generated at CMake
  configure time via `pygmentize` and injected into the docinfo through a
  `@PYGMENTS_DARK_CSS@` placeholder, scoped under
  `@media (prefers-color-scheme: dark)`.

To support template substitution, `doc/docinfo.html` is renamed to
`docinfo.html.in` and produced into the build directory via
`configure_file`; all HTML targets now depend on the generated docinfo
and the `docinfodir` attribute points to the binary dir.

Code blocks also gain a subtle 3D bevel:

- `pre` borders use theme-specific bevel colors (`--pre-bevel-light` on
  top/left, `--pre-bevel-dark` on bottom/right) for a raised look in both
  themes.
- A shared `--pre-bevel-bg` surface color is applied to literalblock,
  listingblock and `pre.pygments`, so all code blocks sit on the same
  background regardless of the pygments style.
- `pre { line-height: 1.25 }` is forced to keep line spacing consistent
  between light (Asciidoctor base `1.45`) and dark (pygments `125%`).

`python3-pygments` is added to the documented build dependencies (the
`pygmentize` binary it provides is required at configure time).
2026-05-24 16:46:36 +02:00
weechatter 86f51b66b3 core: update German translations 2026-05-23 21:42:48 +02:00
Sébastien Helleu 1400b6c197 core: add fix of IRC tag in ChangeLog 2026-05-23 13:23:26 +02:00
Sébastien Helleu c71978c0b3 core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals (closes #1742) 2026-05-23 12:15:04 +02:00
Sébastien Helleu 4c38ce050b irc, script: display all input actions and in the same way in /list and /script buffers title 2026-05-22 07:56:31 +02:00
Sébastien Helleu 5520ed1950 fset: remove error displayed in core buffer when clicking with the mouse below the last option displayed 2026-05-21 13:55:15 +02:00
Sébastien Helleu ad35aef1f4 core: fix French translations 2026-05-20 21:56:45 +02:00
Sébastien Helleu 88f0070674 irc: fix tag in message with list of tags when joining a channel
The message with list of nicks on the channel has now tag irc_353 instead of
irc_366.
2026-05-20 20:24:06 +02:00
Sébastien Helleu 7683287f71 relay: add "api" protocol in help on options relay.network.password_hash_algo and relay.network.password_hash_iterations 2026-05-20 20:19:30 +02:00
Sébastien Helleu 33adaef85c core: add missing word in French translation of the welcome message 2026-05-20 20:13:26 +02:00
Sébastien Helleu 6f3c804379 core: add missing word in French translation of /help upgrade 2026-05-20 20:12:37 +02:00
Sébastien Helleu 617b4e4dee core: fix option name in French translation of /help buffer 2026-05-20 08:31:55 +02:00
Sébastien Helleu ea1eb76b2d core: fix trailing punctuation in German translation of /help script.look.use_keys 2026-05-17 20:59:07 +02:00
weechatter ad12925d6c core: update German translations 2026-05-13 21:04:45 +02:00
Sébastien Helleu a5fcf898b9 ci: bump poexam to version 0.0.10 2026-05-13 07:43:47 +02:00
Ivan Pešić 14d544be39 core: update Serbian translation (#2318) 2026-05-12 22:40:12 +02:00
Sébastien Helleu 3e994996c6 core: set max curl version to 8.21.0 for symbol CURLAUTH_DIGEST_IE 2026-05-12 13:12:12 +02:00
Sébastien Helleu 3341b9a2d2 core: remove zero width spaces (U+200B) in German translation of /help pipe 2026-05-10 19:28:25 +02:00
Sébastien Helleu 815640b840 relay: add option relay.network.unix_socket_permissions (closes #2317) 2026-05-10 19:22:57 +02:00
Sébastien Helleu acd3d91318 core: fix "Language" field in German translations
Country code is unnecessary: language "de" is equivalent to "de_DE".
2026-05-10 10:04:21 +02:00
Sébastien Helleu ef5f4d8ee6 core: fix "Language-Team" field in gettext file headers 2026-05-10 10:04:19 +02:00
weechatter d40217d1e6 core: update German translations 2026-05-06 15:59:20 +02:00
Sébastien Helleu 17b593325a core: complete /help away by mentioning the option irc.look.display_away 2026-05-04 18:47:04 +02:00
weechatter 3456e848da core: update German translations 2026-04-30 14:33:33 +02:00
Sébastien Helleu 723232ac35 ci: bump Lua from 5.3 to 5.4 2026-04-30 00:17:54 +02:00
Sébastien Helleu 5f5f9f35e7 debian: bump Lua from 5.3 to 5.4 2026-04-30 00:17:23 +02:00
Sébastien Helleu 86a6c4f5ff debian: remove patch for build of Debian packages on Ubuntu Focal 2026-04-29 23:58:22 +02:00
Sébastien Helleu 3082c2e4e5 core: add condition on connected relay api clients in default value of option weechat.look.hotlist_add_conditions 2026-04-28 21:30:51 +02:00
Sébastien Helleu 062109e33d relay: add protocol "api" in description of info "relay_client_count" 2026-04-28 21:22:38 +02:00
Sébastien Helleu fd88c9a45b relay: remove protocols from the plugin description 2026-04-28 21:19:10 +02:00
Sébastien Helleu a8c4d5604e ci: bump poexam to version 0.0.9 2026-04-16 20:32:06 +02:00
Emir SARI ef4c657157 core: update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2026-04-15 13:20:06 +02:00
Sébastien Helleu 0c29e5a630 core: fix possible integer truncation in functions eval_string_cut and eval_string_repeat 2026-04-10 21:48:56 +02:00
Sébastien Helleu 77a0dbfd44 core: remove dead code 2026-04-10 21:48:37 +02:00
weechatter afa42ec851 core: update German translations 2026-04-06 11:29:02 +02:00
Sébastien Helleu 8da86431da logger: fix file size example in /help logger.file.rotation_size_max 2026-04-05 21:50:41 +02:00
Sébastien Helleu 3d7f988973 core: use util functions to parse integers in bar functions 2026-04-05 16:53:05 +02:00
Sébastien Helleu 5ed21d7dad core: use util functions to parse integers in gui curses functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu 54eff44d74 core: check error ERANGE after call to strtoul in function util_version_number 2026-04-05 15:33:33 +02:00
Sébastien Helleu 83d760deae core: check error ERANGE after call to strtoull in function util_parse_delay 2026-04-05 15:33:33 +02:00
Sébastien Helleu 5147b19e51 core: use function util_parse_longlong in function util_parse_time 2026-04-05 15:33:33 +02:00
Sébastien Helleu 50959eeb01 core: use function util_parse_longlong in upgrade functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu ac2ed69c0b core: use function util_parse_longlong in function sys_setrlimit 2026-04-05 15:33:33 +02:00