196 Commits
Author SHA1 Message Date
Alhuda Khan 8dc96ae08c web: only delete channels, notes, keys and certs on POST 2026-10-26 19:15:53 +05:30
Alexey Sokolov 9962274521 Merge pull request #2058 from kitkatt7/bouncedcc-refuse-loopback-peer
bouncedcc: refuse DCC requests from IRC aimed at loopback or link-local
2026-10-24 10:09:16 +01:00
Alhuda Khan a9ec2fb9a4 bouncedcc: connect to the bounce port via localhost in the test
The bounce listener binds to the IRC socket's local address. With the
inttest unix sockets that is "localhost" on Linux, which Csocket
resolves to ::1, so connecting to 127.0.0.1 never reached it.
2026-10-24 11:57:02 +05:30
Alhuda Khan 2045a50baa test: make it clear the user's own password isn't used in ImapAuthAllowedHosts 2026-10-24 11:37:07 +05:30
Alhuda Khan 064fa95318 enforce allowed hosts when an auth module accepts the login
The Allow list was only checked in CZNC::AuthUser() after the core
password check, so logins accepted by imapauth, cyrusauth or certauth
(including SASL EXTERNAL) ignored it. Check it in CAuthBase::AcceptLogin()
and CClient::AcceptSASLLogin() instead.
2026-10-23 20:48:13 +05:30
Alhuda Khan d5375e58f8 bouncedcc: only let the user's own clients connect to an IRC-originated bounce
When the DCC request came from IRC, ZNC connects out to the remote peer
and the thing connecting to the bounce listener should be one of the
user's clients. In GetSockObj, compare the connecting address with the
remote IP of each currently connected client and refuse anyone else,
closing the accepted socket straight away while leaving the listener up
for the real client. The user-originated path is unchanged, since there
it is the remote IRC peer that is expected to connect.
2026-10-23 13:00:06 +05:30
Alhuda Khan 8aef9873fc bouncedcc: refuse DCC requests from IRC aimed at loopback or link-local
The address in an incoming DCC CHAT/SEND is chosen by the remote IRC
user, and ZNC is the side that connects to it, relaying traffic to
whoever connects to the bounce listener. Refuse requests that point at
0/8, 127/8, 169.254/16, 224/3 or values above 32 bits (which
CUtils::GetIP would otherwise mask down to one of those).
2026-10-20 17:36:19 +05:30
Alhuda Khan 2b7e1b820b imapauth: quote LOGIN arguments and refuse passwords with line breaks 2026-10-20 14:18:47 +05:30
RealKindOne f5c865015c listsockets: Add TODO comment and update test. 2026-10-01 20:00:11 -04:00
RealKindOne bc25a36972 listsockets: Fix 1970s date bug.
Fixes #1910
2026-10-01 15:26:10 -04:00
RealKindOne d6c2c32de8 Stop ZNC from prepending '#' if missing in join command.
Fixes #1794
2026-09-13 14:20:36 -04:00
RealKindOne 30d14d0841 Improve test coverage for clearbufferonmsg, crypt, ctcpflood, and watch.
Close #2038
2026-09-13 11:27:54 +01:00
RealKindOne cdf29c0dd4 awaystore: Fix NoSSL and GCC ASin build 2026-09-13 11:27:31 +01:00
RealKindOne ff65bc01fb awaystore: Modernize and add test. Fixed various bugs.
Fixed 'pass' command to save password in CBlowfish(MD5(...)) instead of plaintext.

Fixed 'away' command not updating with a new away message if already away.

Fixed default timer in SetArgsHelpText to match SetAwayTime().

Fixed broken 'Messages' command.

Fixed 'replay' command with IPv6

Fixes #815
2026-09-13 11:27:31 +01:00
RealKindOne 0b860b23bf Fix chansaver test. 2026-09-13 11:27:31 +01:00
RealKindOne 97e3932f03 Fix autoreply, chansaver, and stickychan test. 2026-09-13 11:27:31 +01:00
RealKindOne e7d188c3ec watch: Modernize and update test. 2026-09-13 11:27:31 +01:00
RealKindOne bbfec24e6b stichychan: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne ecaf056d47 nickserv: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne 9dbf062d87 kickrejoin: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne ec49f11be6 keepnick: Modernize and update test. 2026-09-13 11:27:31 +01:00
RealKindOne cec9741003 flooddetach: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne ca24ae726c ctcpflood: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne 2a2b6068e8 clearbufferonmsg: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne 28b9d8cbfb chansaver: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne 97b1e8ab79 bouncedcc: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne 0832094976 autoreply: Modernize and add test. 2026-09-13 11:27:31 +01:00
RealKindOne a75612dd15 autoattach: Modernize and update test. 2026-09-13 11:27:31 +01:00
Alexey Sokolov 76cdad9e6a Merge branch '1.10.x' 2026-09-13 10:54:57 +01:00
RealKindOne af5cdd0192 crypt: Modernize and add test. Fix OnNumericMessage 332 issue.
It was possible to trigger null pointer dereference during
OnNumericMessage

The affected versions are 1.7.0+

CVE-2026-82374
2026-09-12 19:08:21 +01:00
RealKindOne a2b0decb8e Fix MotdBufferDoesNotAccumulate376 test. 2026-08-21 03:37:07 -04:00
RealKindOne 4fbccd0cc4 Fix MOTD buffering to prevent duplicate 376 messages after rate limiting
Added m_bMotdBegun flag to track MOTD state. MOTD lines (372, 376) are now only
buffered if MOTD has begun (375/422), and 376 itself is not buffered.

The flag is reset on 263 rate limit responses to prevent repeat 376 messages.

Fixes #1460
2026-07-23 04:38:56 -04:00
Alexey Sokolov 3e95cf44a6 Restore test
I somehow oversimplified it, breaking it
2026-07-23 02:35:29 +01:00
Alexey Sokolov 133f0ad585 typo 2026-07-23 02:10:28 +01:00
Alexey Sokolov 7d4879ab26 Cleanup previous PR, add integration test for multiple joins 2026-07-22 09:24:52 +01:00
RealKindOne d2fc5d550a Apply fixes for IsParting() pull request. 2026-07-22 01:58:01 -04:00
RealKindOne a0d58c8fed Add IsParting() flag to track PART commands waiting IRCd response.
Fixes potential desync where ZNC marks channel as parted before server
confirms the PART, which could cause issues if the server never replies.

Add unittests and integration tests.
2026-07-21 03:24:38 -04:00
RealKindOne 3ceae3ad26 Fix part/join not working when a client sends '/cycle' or '/hop' command. 2026-07-20 04:33:04 -04:00
RealKindOne 13268feefe Revert "Revert "Fix JOIN command not joining detached channels on other clients.""
The revert was made by mistake due to misreading of 'znc -D'.

This reverts commit 6d470db241.
2026-07-20 04:25:50 -04:00
Alexey Sokolov 6d470db241 Revert "Fix JOIN command not joining detached channels on other clients."
This reverts commit ba32b092e9.

It broke /hop (/part+/join) due to race with server
2026-07-19 20:35:31 +01:00
RealKindOne ba32b092e9 Fix JOIN command not joining detached channels on other clients. 2026-07-01 13:59:18 -04:00
Alexey Sokolov 53ffcc909b add include 2026-06-08 22:43:13 +01:00
Alexey Sokolov 2a9359d1fb Merge branch 'nossl' of github.com:DarthGandalf/znc into nossl 2026-06-08 22:07:34 +01:00
Alexey Sokolov ad12a6011d Skip tests which require SSL 2026-06-08 22:07:11 +01:00
Alexey Sokolovanddgw 14846166c6 Update test/integration/framework/znctest.cpp
Co-authored-by: dgw <dgw@technobabbl.es>
2026-06-08 22:00:37 +01:00
Alexey Sokolov 197a235764 test: Don't wait for SSL question if built without SSL
And don't hardcode 6667 in preparation for #2022
2026-06-08 21:54:34 +01:00
Falk Rund ad6a397ca4 Welcome to 2026
[skip ci]
2026-01-01 13:44:32 +01:00
Alexey Sokolov d8b8c16783 Merge branch '1.10.x' 2025-12-10 00:55:07 +00:00
Alexey Sokolov 8c983564e8 Add test for modperl SCString functions.
Pass CClient to the OnClientGetSASLMechanisms callback.

See #1970
2025-07-31 23:47:26 +01:00
KindOne d9ee1da873 Fix spacing in StripControls test. 2025-07-15 00:01:31 -04:00