1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-30 06:36:38 +02:00
Commit Graph

9857 Commits

Author SHA1 Message Date
Bram Matthys 660a501617 ** UnrealIRCd 6.1.2-rc1 ** 2023-09-08 17:46:18 +02:00
Bram Matthys d909e86aef Update curl-ca-bundle to Tue Aug 22 03:12:04 2023 GMT
[skip ci]
2023-09-08 17:37:28 +02:00
Bram Matthys bcc07b1591 Integrate third/blacklistrecheck functionality (set::blacklist::recheck-time)
https://www.unrealircd.org/docs/Set_block#set::blacklist::recheck-time
2023-09-06 16:31:55 +02:00
Bram Matthys 89b2d91084 In HOOKTYPE_PRE_CHANMSG the mtags is now a MessageTag **,
so a pointer-to-a-pointer rather than a pointer, to allow stripping
message tags by modules. Needed for a module from Valware.
2023-08-19 17:26:14 +02:00
Bram Matthys d63a8cf2d5 Show who actually tried to use a banned nick.
Reported by Amiga600 in https://bugs.unrealircd.org/view.php?id=6300
Inspired by patch from Valware in https://github.com/unrealircd/unrealircd/pull/255
2023-08-19 12:17:00 +02:00
netjester f756b7bea6 Remember answer to "generate certificate" question in ./Config (#256) 2023-08-19 10:06:09 +00:00
Bram Matthys 2665cec73b Fix crash when ~security-group:securitygroup is used in conf (so old style
in eg ban user::mask).
Reported by BlackBishop in https://bugs.unrealircd.org/view.php?id=6319
2023-07-26 12:45:49 +02:00
Bram Matthys 50753b4678 Make central spamfilters require an 'id', and ignore for non-central.
At least for now...
2023-07-21 12:26:02 +02:00
Bram Matthys 89e5309326 Add set::central-spamfilter::feed and update the page at
https://www.unrealircd.org/docs/Central_Spamfilter
2023-07-21 12:03:43 +02:00
Bram Matthys cd19198e3b Spamfilter fixes: prevent actions that are currently config-only from
being added by other servers and being able to spread to areas of
which the code is currently not ready for ('set', 'report', 'stop').
2023-07-20 14:50:40 +02:00
Bram Matthys e54382fe95 Use (*errors)++ consistently.
This fixes one bug from yesterday in securitygroup.c:258,
fixes 2 (harmless) warnings and other than that just style.
2023-07-17 09:03:03 +02:00
Bram Matthys 62503aacae Update release notes a bit
[skip ci]
2023-07-16 19:56:19 +02:00
Bram Matthys 937236126f Add new spamfilter type 'raw' which matches against a raw command/protocol line.
SPAMFILTER add -simple R block - Hi_there! LIST*

Though it is more useful in complex spamfilter rules in the conf, presumably.
2023-07-16 19:47:43 +02:00
Bram Matthys f062d3f178 Fix memory leak if using sni blocks 2023-07-16 18:52:32 +02:00
Bram Matthys 8135a6fdfe Possibly fix Windows build. 2023-07-16 18:29:56 +02:00
Bram Matthys 4a25ce5cf2 Remove antimixedutf8 changes from release notes
[skip ci]
2023-07-16 17:47:08 +02:00
Bram Matthys 3e2f668f10 Revert antimixedutf8 changes from earlier, back to 6.1.1(.1) version again. 2023-07-16 17:27:47 +02:00
Bram Matthys 519af59705 Update release notes
[skip ci]
2023-07-16 12:32:02 +02:00
Bram Matthys 11bd657e8a Fix set unknown-users { } not working
Repoerted by BlackBishop in https://bugs.unrealircd.org/view.php?id=6292
2023-07-16 12:22:16 +02:00
Bram Matthys b272b6700a Add security-group::rule support, see https://www.unrealircd.org/docs/Crule 2023-07-16 12:09:01 +02:00
Bram Matthys 59c6c99ba3 spamfilter::rule: add destination('#xyz') support (supports wildcards) 2023-07-16 11:29:53 +02:00
Bram Matthys 13bb09aa4b crule: add inchannel('#xyz'), and inchannel('@#needopshere') works too 2023-07-16 11:22:02 +02:00
Bram Matthys b1d0a05638 Make 'channel' work in security groups. 2023-07-16 11:06:42 +02:00
Bram Matthys 9b11366a8e crule: code cleanups / conform a bit more to unrealircd style 2023-07-16 10:52:03 +02:00
Bram Matthys b325f88795 crule/spamfilter: pass text in crule context, not used yet, but could
be useful in some future crule function.
[skip ci]
2023-07-16 10:46:39 +02:00
Bram Matthys 2beefcd2ee crule: remove CR_DEBUG, bump some limits and remove collapse() call 2023-07-16 10:40:11 +02:00
Bram Matthys 08cb0fc05d Move crule to a module, so we can hot-patch if needed in the future.
This is a mandatory module to load, and included in modules.default.conf.

This also meant that the crule_test() etc efunctions are available
before running config test routines, so we now have a flag for
early efuncs. I guess we could consider doing that for all efuncs
though, so not sure if this flag is really needed.
2023-07-16 10:33:25 +02:00
Bram Matthys 36fc839022 Support single quotes in spamfilter::rule, for like xyz('bla/bla') 2023-07-16 09:31:02 +02:00
Bram Matthys d5e8e8f324 Add some more spamfilter::rule functions 2023-07-16 09:20:54 +02:00
Bram Matthys c6ae5b05c1 Update release notes a bit
[skip ci]
2023-07-16 09:07:57 +02:00
Bram Matthys cdc14569a9 Warn on plaintext oper::password in conf and even go as far as
generating the password hashes and suggesting using those.

This also starts the initial work on set::best-practices
https://www.unrealircd.org/docs/Set_block#set::best-practices
with hashed-passwords as the first setting there.
2023-07-15 19:02:31 +02:00
Bram Matthys 78c3766038 Showing this "Configuration test passed OK" makes no sense after
"Configuration loaded", i think it was meant for ./unrealircd configtest
only.

[skip ci]
2023-07-15 18:45:57 +02:00
Bram Matthys 202665ec87 For watch away notification, a user who is away could change their nick,
and that nick could be on someones watch list. In such a case we
should not only send RPL_LOGON but also a RPL_GONEAWAY.

Reported by Khaled and fix suggested by Khaled & Sadie.
2023-07-15 16:47:55 +02:00
Bram Matthys 934b0b1ea1 WATCH away notification: fix RPL_GONEAWAY and RPL_REAWAY not being sent
due to wrong event name being used. Noticed this bug in U6 (and
this bug does not exist in U5) after being pointed at watch away
notification again.
2023-07-15 16:41:21 +02:00
Bram Matthys 039dc566ec Lower argon2 parameters so the algorithm runs at a more reasonable speed. 2023-07-15 09:05:59 +02:00
Bram Matthys b3995f48ff Mention password hashing in the example.conf itself.
Suggested by rafaelgrether in https://bugs.unrealircd.org/view.php?id=6303
2023-07-15 09:04:07 +02:00
Bram Matthys 5688825ebd Default to argon2 library shipped with UnrealIRCd, the reason
for this is that system argon2 is often much slower (2x slower
on Ubuntu and Debian, for instance), which is not good.
You can still use the system library with the configure option:
--with-system-argon2
2023-07-15 08:49:11 +02:00
Bram Matthys ab71636390 Fix downloads_in_progress() always returning 0 if using cURL 2023-07-14 17:01:59 +02:00
Bram Matthys a153a2cce3 Change definition of parse_ban_action_config(), was too easy to leak memory.
Often you have default values for the config, and then a subsequent config
parsing run would overwrite the return value (= memory leak), merging/appending
would make no sense either, so it would force a free in all code before
calling us, well... let's just deal with it ourselves instead then ;)
2023-07-14 08:08:47 +02:00
Bram Matthys c2419e0f40 Implement spamreport::rate-limit 2023-07-11 20:19:00 +02:00
Bram Matthys e9716d3ce6 Fix compile problem on Windows
[skip ci]
2023-07-11 16:26:35 +02:00
Bram Matthys 9625a1221b Make Cmode_t an unsigned long long to have more chanmodes on 32 bit archs.
Reported by BlackBishop in https://bugs.unrealircd.org/view.php?id=6301
[skip ci]
2023-07-11 15:27:13 +02:00
Bram Matthys 767f5647cd Add some explicit cast to fix warning on 32 bit archs.
Yeah we could use %z here nowadays but we don't have strict C99 requirements(?),
well we have some :D

[skip ci]
2023-07-11 15:20:16 +02:00
Bram Matthys 22f8eb8729 Central spamfilter: fix memory leak (freeing ce/cfptr)
[skip ci]
2023-07-11 15:14:58 +02:00
Bram Matthys 2440714d13 Fix tkldb crash, had to do with stealing references. 2023-07-11 14:46:19 +02:00
Bram Matthys 4c3d2a6d6d Fix write bug in tkldb and add spamfilter::action stop.
The spamfilter::action stop ill prevent processing other spamfilters.
This would normally be a bit unusual, and potentially dangerous when you
do exclude things this way, but can be useful in some circumstances.

Stopping only affects the same type of spamfilters (general or central
spamfilters), so they don't interfere.

The tkldb write DB bug had to do with that it was processing
central spamfilters, which should be skipped just like config
based spamfilters were already skipped.
2023-07-11 14:32:11 +02:00
Bram Matthys 32701e6f99 Central spamfilter: don't stop processing on 1 bad spamfilter block. 2023-07-11 13:34:28 +02:00
Bram Matthys 018efd8366 Fix crash in spamfilter { } block handling due to unitialized variable 2023-07-11 12:15:01 +02:00
Bram Matthys f333aa0c09 New option set::spamfilter::show-message-content-on-hit:
you can now configure to hide the message content in spamfilter hit
messages. Generally it is very useful to see if a spamfilter hit is
correct or not, so the default is 'always', but it also has privacy
implications so there is now this option to disable it.

Suggested by alice, quite a while ago.

https://www.unrealircd.org/docs/Set_block#set::spamfilter::show-message-content-on-hit

Also as mentioned there:
UnrealIRCd has the following spying countermeasure (for many years) to help
that spamfilters are not abused for spying. When a spamfilter hit happens
that has an action like gline or blocking, it is visible to the user that an
action was taken. There is also the action 'warn', which means: take no
action and only warn IRCOps, that one would be easy to use as a spy tool, so
when this happens and message content was revealed, numeric 659
(RPL_SPAMCMDFWD) is sent to the client to indicate that the message is
allowed through but IRCOps were informed.
With this new set::spamfilter::show-message-content-on-hit feature, when
the message content was hidden due to this setting (eg due to 'never' or
'channel-only'), the warn message will not be sent as there is no need to
inform the user in such a case.
2023-07-11 12:11:26 +02:00
Bram Matthys 4df6ed7f9a Get rid of duplicate "spamfilter hit" code. 2023-07-11 11:42:06 +02:00