Commit Graph
61 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 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
Alexey Sokolov ad12a6011d Skip tests which require SSL 2026-06-08 22:07:11 +01:00
Falk Rund ad6a397ca4 Welcome to 2026
[skip ci]
2026-01-01 13:44:32 +01:00
KindOne d9ee1da873 Fix spacing in StripControls test. 2025-07-15 00:01:31 -04:00
RealKindOne f89ae9d158 stripcontrols: Use new On...Message events.
Added OnTopicMessage and stripping for /list and /topic output.

Fixes #1179
2025-07-08 01:35:52 -04:00
Alexey Sokolov aaeab22ea3 Fix processing of multi-token CAP ACK
I broke it in 5943bc9ed9 while fixing #1950
2025-05-11 18:49:35 +01:00
Alexey Sokolov 951c39479f Update several tests to accept empty string or "localhost"
For unix sockets the behavior of getpeername() is different on different OS

This required to add support of regex to the integration test framework
2025-04-22 01:10:22 +01:00
Alexey Sokolov ce0a1584ba Cygwin: try a horrible hack to fix integration test with unix sockets 2025-04-21 15:47:21 +01:00
Alexey Sokolov b642d92ce7 Switch integration test to mostly use unix sockets
By not using the same hardcoded number for every test, we can parallelize the test now.

There are several cases remaining where we can't easily use unix sockets (e.g. QSslSocket or imapauth module), for that ask kernel what port number is currently free to use. This is a bit racy though.
2025-04-21 00:19:46 +01:00
Alexey Sokolov ab4125692c Remove accidentally added header from previous commit 2025-03-16 11:14:01 +00:00
Alexey Sokolov 89e6d58d5a SASL: Move tests which are not about modules
from modules.cpp to core.cpp
2025-03-16 09:46:10 +00:00
Alexey Sokolov 0a45c4710a SASL: Support receiving USER and NICK after CAP END 2025-03-16 09:44:10 +00:00
Alexey Sokolov 9f8015b8ad Add several more tests to sasl 2025-02-28 20:48:24 +01:00
Alexey Sokolov 37457105f3 Support SASL EXTERNAL in certauth 2025-02-24 22:52:47 +00:00
Alexey Sokolov 6e9980d67f Various SASL changes 2025-02-22 15:59:52 +00:00
Alexey Sokolov 41a0030fdb Merge branch 'master' into sasl
Conflicts:
	include/znc/Client.h
	src/Client.cpp
	src/Modules.cpp
	test/integration/tests/modules.cpp
2025-02-13 20:37:32 +00:00
Peter 44e4b95a20 Welcome to 2025 (#1929) 2025-02-07 23:23:45 +00:00
Alexey Sokolov afefc048d0 Simply disconnect if SASL not available on server
Instead of disabling network

This unavailability could be temporarily

Fix #1918
2024-10-13 19:22:48 +01:00
Falk Rund 17a004aa0b Welcome to 2024
[skip ci]
2023-12-31 21:09:25 +01:00
KindOne ee9ad2ff8e Use module names as the module ident.
Some clients will reuse query windows as the client thinks its just a
nick change if you have a existing query window with a module and a different one messages you.

Fix that by using the modules name as the ident.

Update tests to match new modules ident.
2023-09-08 07:21:31 -04:00
delthas 1dd995ef77 Reabse and address PR comments 2023-08-31 14:35:49 +02:00
Falk Rund f9fd05c307 Welcome to 2023 2023-01-01 06:49:00 +01:00