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

10696 Commits

Author SHA1 Message Date
Bram Matthys ced1382eab Fix channel messages not showing up on remote servers (6.1.2-rc2 bug).
This required two members on the same server and channel mode +H to be set
(or set::broadcast-channel-messages 'always', then also with -H).

The cause was a (normally harmless) optimization in
1473f52603 which meant we would loop
through remote servers for the case of +H.

And then the real cause a bug in the linecache system, which
caused servers to be seen as LCUT_NORMAL because locally
connected servers are MyConnect()->true.

And then on the wire (S2S) a message would look like..
:nick!user@host PRIVMSG ...
But nick!user@host is not valid in normal S2S traffic and on the receiving
server is seen as a nick@server message (and 'nick!user' is never found
on 'server' where server is actually a user host)... seems like an
old relic, but this aside.
This in turn, causing the message to be dropped (unknown source),
and the PRIVMSG handler is not called at all.

Bug reported by CrazyCat and then PeGaSuS managed to reproduce the
issue later on irc.unrealircd.org. Thanks!

As said, this only affects 6.1.2-rc2 and chmode +H.
2025-11-02 15:53:42 +01:00
Bram Matthys 89d8653583 Fix missing const in check_version()
Arguments were const char * in the EFunction but not in the actual function,
flagged by UBSan. Similar to 8c26cec5fc.
2025-10-31 09:54:36 +01:00
Bram Matthys 3510722cef url_unreal: fix relative redirects not working
When using build-in UnrealIRCds https support, a redirect to
https://etc... was working fine, but an internal redirect to /xyz
would fail.
2025-10-31 09:41:50 +01:00
Val Lorentz 295d0932fb message-tags: Fix length checks (PR #323)
The fix in da703efdf4 (6.2.1-rc1) was
incorrect because it swapped the limits for clients and servers
2025-10-31 09:32:00 +01:00
Bram Matthys 663a33e981 Update release notes a bit on webhooks and other recent improvements.
[skip ci]
2025-10-29 14:07:09 +01:00
Bram Matthys 3a35689a43 Adjust the "To ensure UnrealIRCd automatically starts on system startup" text
at the end of "make install". Previously it mentioned installing a
Cron job, now it also mentions Systemd.
2025-10-29 10:39:36 +01:00
Bram Matthys fea1d2ab8b Add two systemd unit files in extras/startup:
Use extras/startup/unrealircd.service if you want a system-wide unit
file, which is normally what people tend to use. The benefit of this
is that it allows setting some security options.

Use extras/startup/unrealircd_user.service if you want a user unit
file. This works if you don't have root on the machine.
2025-10-29 10:13:04 +01:00
Bram Matthys 82417d0cd2 Don't write PID file if running in foreground mode (-F) and error on
./unrealircd [start|stop|restart] commands if unrealircd is running
but without a pid, which will be the case if running through systemd.

The systemd example unit files will be in a future commit.
2025-10-29 10:04:32 +01:00
Bram Matthys 82f21df20b Make unrealircd binary mention at least -F
Reported by henk in https://bugs.unrealircd.org/view.php?id=6424
2025-10-29 08:17:35 +01:00
Valerie Liu c16d602cc2 Add webhooks functionality to log blocks (PR #322) 2025-10-27 08:50:38 +01:00
Bram Matthys b31c394cd0 When channel flood protection kicks in, tell chanops how to get more info,
namely via "MODE #channel +F".

Enhance "MODE #channel +F" by explaining a bit more (like, actions a chanop
can do to change things).

Example of protection kicking in:

*** Channel CTCPflood detected (limit is 7 per 15 seconds), setting mode +C. Type "/MODE #test +F" to get more information on channel flood protection.

Then if you type "MODE #test +F":

Channel '#test' has effective flood setting '[7c#C15,30j#R10,10k#K15,40m#M10,8n#N15]:15' (flood profile 'normal')
-
You are currently using the default anti-flood profile normal.
If you want to change to a different anti-flood profile, for example because flood protection is kicking in too quickly
or too late, then you can use MODE #test +F <profile>. See the list of profiles below (ordered from lax to strict).
List of available flood profiles for +F:
          off: []:0
 very-relaxed: [7c#C15,60j#R10,10k#K15,90m#M10,10n#N15]:15
      relaxed: [7c#C15,45j#R10,10k#K15,60m#M10,10n#N15]:15
       normal: [7c#C15,30j#R10,10k#K15,40m#M10,8n#N15]:15
       strict: [7c#C15,15j#R10,10k#K15,40m#M10,8n#N15]:15
  very-strict: [7c#C15,10j#R10,10k#K15,30m#M10,5n#N15]:15
See also https://www.unrealircd.org/docs/Channel_anti-flood_settings

(And actually there is some bold text there too)

Indirectly suggested in https://bugs.unrealircd.org/view.php?id=6580
by rafaelgrether and PeGaSuS (being more clear to IRCOps what is happening).
2025-10-25 15:30:17 +02:00
Bram Matthys 5b6037698a Forgot to add 3 modules in Windows makefile.
[skip ci]
2025-10-23 19:05:09 +02:00
Bram Matthys 58c37b67f9 ** UnrealIRCd 6.2.1-rc2 ** 2025-10-23 18:02:43 +02:00
Bram Matthys 1feb7bbbfe Workaround gcc UBSan bug triggering -Wstringop-overread 2025-10-17 17:04:52 +02:00
Bram Matthys 23fc12c71c Update doc/unrealircd_wiki.zim (current wiki) 2025-10-17 11:25:27 +02:00
Bram Matthys f5a5dae4aa Make sanitizer question in ./Config not only enable ASan but also UBSan
(both AddressSanitizer and UndefinedBehaviorSanitizer)

This previously helped finding 8c26cec5fc

Also update the ./Config text a bit, eg about ASan not running OK on FreeBSD,
which only affects <14.2 as per https://bugs.unrealircd.org/view.php?id=6470#c23412
2025-10-17 09:27:43 +02:00
Bram Matthys ad991e9d0b Move "web" too from MODDATATYPE_CLIENT to MODDATATYPE_LOCAL_CLIENT
Since this is always about a local connection
2025-10-17 08:29:09 +02:00
Bram Matthys 8067ee3ad2 Move some modules using MODDATATYPE_CLIENT to MODDATATYPE_LOCAL_CLIENT
authprompt
blacklist
blacklistrecheck

This frees up 3 positions in MODDATATYPE_CLIENT
2025-10-17 08:25:06 +02:00
Bram Matthys 1d774de862 Add MODDATATYPE_* to MODULE for IRCOps 2025-10-17 08:19:15 +02:00
Bram Matthys b3821c3c4f Code cleanup: now that MDInfo is split by [req.type],
we don't need to check for type == req.type anymore.
2025-10-15 08:32:28 +02:00
Bram Matthys c1dff43c8d Make the "ModDataAdd: out of space" error message more helpful 2025-10-15 08:31:27 +02:00
Bram Matthys a52281dc28 Some more attempts to kill a proxy crash bug 2025-10-14 19:52:57 +02:00
Bram Matthys da703efdf4 Fix OOB write in message tag S2S parsing, introduced in 6.2.1-rc1.
This would happen if a remote server (trusted server traffic) would
come up with a 8K message tag (or actually name or value of 8K).
2025-10-14 16:51:31 +02:00
Bram Matthys 5c587e6230 Fix crash in new ISUPPORT command (if sent by remote server)
That is, trusted S2S traffic.
2025-10-14 16:44:17 +02:00
Bram Matthys 7f1d42856f Some minor rewording of release notes / adding links 2025-10-12 15:26:43 +02:00
Bram Matthys 15e367a822 ** UnrealIRCd 6.2.1-rc1 ** 2025-10-12 15:10:32 +02:00
Bram Matthys 058affe028 Fix crash with proxy { } block and if client is killed after parse_proxy_header().
Have not tried to reproduce but this could happen if the client is Z-Lined.
2025-10-11 10:22:41 +02:00
Bram Matthys 0607a63d91 Write a lot more in release notes 2025-10-10 19:21:02 +02:00
Bram Matthys 01ffa1c98f Merge branch 'unreal60_dev' of github.com:unrealircd/unrealircd into unreal60_dev 2025-10-10 08:44:15 +02:00
Bram Matthys 6a837bf669 inetntop() was using a wrong sizeof() which could trigger a message
about an overflow with eg 'STATS maxperip' (IRCOp-only command).
Also, STATS maxperip failed to return 1 in the hook, resulting in
unnecessary STATS help output after the list.
2025-10-10 08:42:38 +02:00
Rafael Grether 1182bd4430 Fix ./Config printing a message about 'make' not installed on OpenBSD (PR #321)
Replace 'make --version' check with 'command -v' for better BSD and non GNU/Linux support.
2025-10-08 09:11:47 +02:00
Bram Matthys 32570ad2f8 And let's add an IsUser() here too. This isn't a problem atm,
since it is only called from JOIN (so always a user), but you
never know in the future...
2025-10-07 18:35:16 +02:00
Bram Matthys 789ef5aa4c Fix crash due to recent commits. Don't call invisible_user_in_channel for servers. 2025-10-07 18:33:27 +02:00
Bram Matthys 99ae01edf8 Fix tls-tests after last chgs 2025-10-06 14:23:04 +02:00
Bram Matthys be8e2f4764 CI: Add -slightlyfast so ban expiry test is skipped (that one runs in BuildBot anyway)
This to keep the CI at GitHub reasonably fast.
2025-10-06 11:52:52 +02:00
Bram Matthys 7cb3b50737 run-test: add $RUNTESTFLAGS 2025-10-06 11:52:04 +02:00
Bram Matthys cfaae0533d Move testssl.sh cloning to tls-tests 2025-10-06 11:34:02 +02:00
Bram Matthys f0b6a648a3 Add CI badge to top of README 2025-10-06 11:14:16 +02:00
Bram Matthys acab7240c9 CI: Whoops.. missed the last line. 2025-10-06 11:05:24 +02:00
Bram Matthys 03423e155c GitHub Actions: add Linux CI (in addition to existing BuildBot)
We already run CI since 2014, first via Travis CI, then when it became
paid we switched to self-hosted BuildBot in 2019. Later that year
GitHub Actions came also in existence, but we already switched over to
BuildBot by then so didn't use it.

We will still use BuildBot on self-hosted to test various Ubuntu and
Debian distro versions, FreeBSD and Windows. Also, in the BuildBot we
have our own pre-build environment where we run Services tests (with
both anope and atheme), we run TLS there (again on all those distros
with various OpenSSL versions). And we also test both clang and gcc.

So what is new? Well, now we will also run a "quick test" via GitHub
Actions, like most projects out there on GitHub. Not the services test,
not the TLS tests, but simply latest Ubuntu and then clang+gcc.
The main benefit of this is that it will also show up on Pull Requests
and makes it "public" as our BuildBot page is restricted.
2025-10-06 11:01:28 +02:00
Bram Matthys 573f65efb5 Add extras/tests/tls/tls-tests.bbwrapper which i use for BuildBot 2025-10-06 10:07:22 +02:00
Bram Matthys 85ce779f93 Use $NOSERVICES instead of $FREEBSD if we want to skip services tests 2025-10-06 09:32:11 +02:00
Bram Matthys 4a3d3bf72f extras/tests/tls/tls-tests: split these off in an additional step
A side-effect is that this will keep unrealircd and services running.
2025-10-06 08:58:17 +02:00
Bram Matthys 07b99d1429 extras/build-tests/nix/build: support additional CPPFLAGS
and output something more useful.
2025-10-06 08:55:17 +02:00
Bram Matthys 326b1cd349 quit_sendto_local_common_channels(): rename some variables
Previous was way too confusing where user was actually a client and
channels was actually a membership struct. And then you got like
user->user and channels->channel. No, let's make this conform to
the same style that we use elsewhere. Who the hell wrote this !??
Oh, it seems I did :D
2025-10-05 16:23:02 +02:00
Bram Matthys 301c7915a7 Optimize +D stuff in quit_sendto_local_common_channels()
1) Similar to sendto_local_common_channels() go through local_members
   instead of all channel members
2) We have the membership info, so use user_can_see_member_fast()
2025-10-05 16:14:28 +02:00
Bram Matthys ef8394c64d Optimization: avoid find_member_link()'s where possible
This mainly affects MODE #channel +vhoaq and such. And as with all these
optimizations it mostly affects channels with more than 10 people (eg
hundreds or thousands).

Also did add_member_mode() and del_member_mode() but those are not
used by our own code because we always use fast versions anyway.
Oh yeah and the +D invisibility shit via set_user_invisible():
that one i didn't benchmark but should be better as well for
large channels.
2025-10-05 16:03:35 +02:00
Bram Matthys 5f2f020183 Make unreal_copyfile() copy in 16k chunks instead of 1k 2025-10-05 14:05:52 +02:00
Bram Matthys aaa3179676 Avoid running make_cloakedhost() twice for remote clients.
This saves around 5% unrealircd CPU in 100k remote clone tests.
2025-10-05 11:18:11 +02:00
Bram Matthys 9310c655b9 We can do the umode change by UID. Not that it matters much :D.
And parv[0] is always NULL in UnrealIRCd.
2025-10-05 11:02:02 +02:00