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

9983 Commits

Author SHA1 Message Date
Bram Matthys b8a8863c19 Get rid of [BUG] message due to no-implicit-names patch if using DEBUGMODE.
main.BUG_CLIENTCAPABILITYBIT_UNKNOWN_TOKEN [warn] [BUG] ClientCapabilityBit() check for unknown token: no-implicit-names
2024-01-10 18:03:43 +01:00
Bram Matthys ae0206a92a Add oper::auto-join. This setting overrides set::oper-auto-join.
Suggested by Chris_dc in https://bugs.unrealircd.org/view.php?id=6255
2024-01-10 17:06:35 +01:00
Bram Matthys 9f3f9522cf Make operclass available in security-group & mask/match.
security-group netadmin { operclass { netadmin; netadmin-with-override; } }

Untested.
2024-01-10 14:14:14 +01:00
Bram Matthys 079e7babef Fix "Central blocklist too slow to respond" message when using softban
or require authentication { } block.

And the connecting user would get a message every second, which was
a bit floody ;D.

Repoerted by GHF in https://bugs.unrealircd.org/view.php?id=6375
2023-12-28 13:30:49 +01:00
Bram Matthys 64ea1d09d6 Move 'reserved clients' stuff to runtime, since 'ulimit -n' could be lower.
This fixes a bug where if you run ./Config with 'auto' file descriptors,
and then have an unusually low 'ulimit -n' of like 150, you would end up
with a negative amount of file descriptors available for use.

This fix moves it from compile-time setting of reserved fd's to runtime
setting.

All this is wrong, by the way, but that is for another major overhaul,
at least this bug is fixed now :D
2023-12-28 09:00:09 +01:00
Bram Matthys 88c2083df9 Fix no-implicit-names to set official flag. As all buildbots failed. 2023-12-26 15:41:06 +01:00
Bram Matthys 600185deba Add support for CAP draft/no-implicit-names
https://github.com/unrealircd/unrealircd/pull/265 by Valware
"This is an IRCv3 extension which lets clients opt-out of receiving /names on join.
 This is useful for bots on large channels who do not need to know who is in the channel.
 Specification: https://ircv3.net/specs/extensions/no-implicit-names"

+ module rename from 'no-implicit-names-cap' to 'no-implicit-names'
  (simply because no other modules has that -cap suffix)
+ update to Makefile.windows
2023-12-26 14:46:54 +01:00
Bram Matthys 48d3673a02 Only do slow spamfilter detection for regexes, not for 'simple' */?
Since it is pointless and this saves some CPU :)
2023-12-22 15:43:11 +01:00
Bram Matthys c5ed4ef9bb Don't call spamfilter for TAGMSG. If you are filtering that, look at 'T'.
Calling spamfilter for TAGMSG makes no sense as the text is "" (empty) :D

If you want to filter message tags, have a look at spamfilter type 'T',
which filters individual message-tags (not just the ones in TAGMSG but
also for PRIVMSG and NOTICE).

[skip ci]
2023-12-22 15:38:14 +01:00
Bram Matthys 5918d70943 Bump version to 6.1.5-git 2023-12-22 15:34:10 +01:00
Bram Matthys 70a59b8b1e central-api: add format check for api-key so people don't use a request-key there.
Reported by DeviL.
2023-12-18 09:37:18 +01:00
Bram Matthys 49e84436b4 Fix +I ~operclass requiring an operclass block name of >3 characters.
Reported by BlackBishop in https://bugs.unrealircd.org/view.php?id=6372

Was an old leftover check from old style extban API
2023-12-17 09:53:36 +01:00
Bram Matthys 5b5a5bca03 Wait longer for a REHASH when running with ASan 2023-12-17 09:41:58 +01:00
Bram Matthys 96be13d68d ** UnrealIRCd 6.1.4 ** 2023-12-16 16:33:15 +01:00
Bram Matthys 68c2114977 Make sure we never use this variable again ;)
[skip ci]
2023-12-15 12:34:25 +01:00
Bram Matthys b0e87dcafa Fix crash issue in websocket server (CVE-2023-50784) 2023-12-15 12:34:06 +01:00
Bram Matthys fa84174d22 Fix the fix for frame assembly in webserver. 2023-12-12 18:05:23 +01:00
Bram Matthys be1467d1a1 ** UnrealIRCd 6.1.3 ** 2023-12-09 09:02:12 +01:00
Bram Matthys 7b8c9e8d72 Fix memory leak due to change from yesterday (duh..)
Caused by 4178cb3f81
[skip ci]
2023-12-08 07:44:45 +01:00
Bram Matthys 4178cb3f81 Fix frame reassembly in webserver_handle_request_header()
Previously the same code caused no problem, but then
2fcb5b4669 changed the read buffer
size to 16384.
Since then (6.1.2.x) the webserver_handle_request_header() function
was sometimes cutting 1 byte off the packet due to sizeof(netbuf)-1
which was 16383 bytes. We now no longer use a fixed value and
allocate memory dynamically on the heap.

This fixes the bug that I was seeing but this change still needs
serious extra testing as it may affect websockets and RPC!
2023-12-06 18:19:17 +01:00
Bram Matthys 49614fc891 Thanks to Koragg for reporting previous issue :D
54ad2d1586
[skip ci]
2023-12-05 18:31:56 +01:00
Bram Matthys 54ad2d1586 Fix crash with 'crule', because it was being checked against Services bots 2023-12-05 18:22:25 +01:00
Bram Matthys 3428551e54 ** UnrealIRCd 6.1.3-rc1 ** 2023-12-01 09:03:13 +01:00
Bram Matthys 99fcf9adf6 Add unrealircd_version in CBL request, mostly for the future.
[skip ci]
2023-12-01 08:03:43 +01:00
Bram Matthys 0cbe6ad090 Makefile.windows: add src/api-apicallback.c to fix build
[skip ci]
2023-12-01 08:02:31 +01:00
Bram Matthys 96b18946ca Include oper name on /SPAMREPORT (for central spamreport) 2023-12-01 07:58:01 +01:00
Bram Matthys 9685d1e052 Fix module manager: if 1 upgrade failed, the remaining were not upgraded.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=6352
2023-11-29 09:08:55 +01:00
PeGaSuS 3894f35b04 Update RELEASE-NOTES.md to fix reference to 6.1.2 (#264)
[skip ci]
2023-11-29 07:35:25 +00:00
Bram Matthys c9adae83fc Doxygen updates, mostly for https://www.unrealircd.org/docs/Dev:URL_API
Or actually: https://www.unrealircd.org/api/6/structOutgoingWebRequest.html

[skip ci]
2023-11-27 18:20:57 +01:00
Bram Matthys 15b2578620 Some minor release notes updates
[skip ci]
2023-11-27 18:06:02 +01:00
Bram Matthys 53f0f0cb94 Fix unitialized variable access caused by earlier commit of today
(only if you use a proxy block)
2023-11-27 17:59:37 +01:00
Bram Matthys cd1b79d3f7 Fetch Central Spamfilter rules with the API Key via alternate URL.
* The [Central Spamfilter](https://www.unrealircd.org/docs/Central_Spamfilter),
  which provides spamfilter { } blocks that are centrally managed, is
  now fetched from a different URL if you have an Central API key set.
  This way, we can later provide spamfilter { } blocks that build on
  central blocklist scoring functionality, and also don't have to reveal
  the central spamfilter blocks to 100% of the world.
2023-11-27 14:33:00 +01:00
Bram Matthys 3803759bf2 Release notes: mention central-api/-blocklist/-spamreport.
[skip ci]
2023-11-27 13:51:33 +01:00
Bram Matthys 628eb4b52e Update release notes a bit
[skip ci]
2023-11-27 12:55:41 +01:00
Bram Matthys 5f767a8fe8 Proxy block: rework and add support for X-Forwarded-For, Cloudflare, etc. 2023-11-27 12:10:17 +01:00
Bram Matthys f8bd45541d Disable some recent debugcode even with DEBUGMODE on ;D
(And yeah this will eventually be removed altogether)
2023-11-27 10:55:56 +01:00
Bram Matthys 026d5522a8 Remove WSU() items forwarded & secure, since these are in webserver nowadays. 2023-11-27 10:07:34 +01:00
Bram Matthys 02ac1fc0b3 Add an option to check websocket Origin header via
listen {
	websocket {
		allow-origin { *.example.net; }
	}
}

This allows you to limit websockets to a particular domain, IF the
user is using a normal browser.

Note that any non-browser (eg a websocket command line program) could
just spoof the Origin header, so for that case it doesn't really add
any security or real restriction.
2023-11-26 20:08:17 +01:00
Bram Matthys 98c264aabf Fix some more warnings, rather minor.
[skip ci]
2023-11-26 18:48:09 +01:00
Bram Matthys 0a7f1adc8b Add value check for blacklist config, well, fix it i mean.
And fix some compiler warning (remove a useless check).
[skip ci]
2023-11-26 16:36:11 +01:00
Bram Matthys 94bf58add9 Fix crash reporter to use SNI.
As for why BIO_set_conn_hostname() does not set and use it... good Q.
2023-11-26 15:52:47 +01:00
Bram Matthys 07cc8eaeaf central-*.c: remove old module manager stuff and bump version.
[skip ci]
2023-11-25 17:29:06 +01:00
Bram Matthys f1a5f5ab97 Remove accidental 'else' that caused modulemgr to freeze / make install to hang.
... when using url_unreal instead of url_curl.
2023-11-25 12:30:44 +01:00
Bram Matthys 4da58dde41 Update central spamreport, https://www.unrealircd.org/docs/Central_spamreport
set::central-blocklist::spamreport and ::spamreport-enabled are now GONE.
We now require a normal spamreport block, just like for other spamreport
functionality. So, if you want to enable this feature, use:
spamreport unrealircd { type central-spamreport; }

See https://www.unrealircd.org/docs/Central_spamreport for all info.

You can use CBL with central spamreport or central spamreport without CBL.
All explained at that URL.
2023-11-25 11:50:25 +01:00
Bram Matthys d08160baca Add option set::central-blocklist::blocklist-enabled yes/no (default yes).
This is mainly for the (less usual) case when someone wants to
use SPAMREPORT but does NOT want to use CBL:

set {
	central-blocklist {
		blocklist-enabled no;
		spamreport-enabled yes;
	}
}

Also documented at https://www.unrealircd.org/docs/Central_spamreport
under 'Configuration'
2023-11-25 10:26:56 +01:00
Bram Matthys bdfc3c97dd Add RegisterApiCallbackResolverHost() and make blacklist module non-PERM.
Hopefully this works OK... still need to test w/REHASH to see.
2023-11-25 09:39:50 +01:00
Bram Matthys 55d1398fca Move dns.h include to unrealircd.h and remove it elsewhere.
Because I need c-ares prototypes in modules.h, for next commit.
[skip ci]
2023-11-25 09:05:55 +01:00
Bram Matthys 6ce1958e1c Add URL API and use it at one place from central-blocklist. Docs at:
https://www.unrealircd.org/docs/Dev:URL_API
2023-11-25 08:31:12 +01:00
Bram Matthys 7d024f8086 URL API: add request->connect_timeout & request->transfer_timeout
... in case you want to do fine-tuning.

Defaults to DOWNLOAD_CONNECT_TIMEOUT (15 seconds) and
DOWNLOAD_TRANSFER_TIMEOUT (20 seconds).

For example, the module manager uses a shorter timeout of 7 and 20.
(that was already the case, but now it uses the generic api so
 it needed an option to set it to those values)
2023-11-24 14:38:20 +01:00
Bram Matthys 9d3af7f22a Fix Windows compile problem
[skip ci]
2023-11-24 14:26:26 +01:00