1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 10:46:38 +02:00
Commit Graph

9756 Commits

Author SHA1 Message Date
Bram Matthys 8d50efd29e Fix documentation confusing regarding rpc-user::match vs ::mask.
Only match was working earlier, and for now both are accepted,
like everywhere else. Reported by BlackBishop.

Also, added a missing check for unknown rpc-user items, so a
proper "Unknown directive" error is thrown.
(this missing check made the first issue worse)
2023-06-30 15:20:10 +02:00
Bram Matthys 3c82dd61e2 Remove UnrealIRCd 5 from supported versions 2023-06-27 20:00:14 +02:00
Bram Matthys 0cc800e736 Fix crash on invalid badword { } block in config file (one without type) 2023-06-27 18:31:53 +02:00
Bram Matthys 89f9659158 Fix doc\conf\aliases\* being twice in unrealinst.iss
[skip ci]
2023-06-25 16:43:57 +02:00
Bram Matthys a8695dfe0b Whoops, removed an important backslash, fix compile error :D 2023-06-17 18:26:42 +02:00
Val Lorentz d5ceb664bc Add 'history_delete' method to HistoryBackend (#253)
This will allow modules to implement deletion of specific messages
(unlike history_destroy, which removes the entire history of a channel)
2023-06-17 16:10:10 +00:00
Bram Matthys 280a1ddb1d Update this file too :D
[skip ci]
2023-06-17 18:09:38 +02:00
Bram Matthys 407bd84c11 Bump version to 6.1.2-git 2023-06-17 18:08:51 +02:00
Bram Matthys 7bce73a697 Some changes to HOOKTYPE_RECONFIGURE_WEB_LISTENER hack from earlier,
that was added late in 6.1.1 development to fix a crash with removing
websocket listeners. Now replaced with a generic HOOKTYPE_CONFIG_LISTENER
that is not only called for removed listeners, but for all listeners.
2023-06-17 18:04:12 +02:00
Bram Matthys 4b23596b4c Code cleanup: some strncmp -> str_starts_with* replaces (less chance of mistakes) 2023-06-17 17:50:37 +02:00
Bram Matthys 4c2bb2ff21 ** UnrealIRCd 6.1.1.1 ** 2023-06-16 18:06:44 +02:00
Bram Matthys cca19fa7f0 Fix maxperip bug when using a WEBIRC proxy/gateway with IPv4 vs IPv6 mismatch.
(more info to follow)

This also adds "/stats maxperip" for debugging purposes (ircop-only).

[skip ci]
2023-06-16 18:03:03 +02:00
Bram Matthys 65da3d7ccd Mention ./unrealircd upgrade
[skip ci]
2023-06-14 09:14:21 +02:00
Bram Matthys 6e2569a9b7 ** UnrealIRCd 6.1.1 ** 2023-06-14 08:53:07 +02:00
Bram Matthys fd7a715e17 Don't use slow socket closing (w/TLS handshake) for (G)ZLINE.
The whole point of (G)ZLINEs is that it rejects instantly upon
accept, that's what makes them different from KLINE/GLINE.

Commit 89075e532a made it
accidentally use the slow path for this as well.
2023-06-07 15:14:00 +02:00
Bram Matthys c315751c2e Fix crash with log destination 'syslog'. 2023-06-04 15:11:58 +02:00
Bram Matthys acbedd5938 Also trigger hi connection warning when near maxconnection limit 2023-06-04 10:06:12 +02:00
Val Lorentz a94884c6a9 Mention that hbm_return_after actually implements BETWEEN (#252) 2023-06-04 07:58:57 +00:00
Bram Matthys 635c4e22dc README: Sync "About UnrealIRCd" with the text on the site
[skip ci]
2023-05-31 18:20:46 +02:00
Bram Matthys 61cd88c710 Update market share percentage in README to match IRCStats Dec'2022 2023-05-31 16:09:56 +02:00
Bram Matthys f1a5e30e8a ** UnrealIRCd 6.1.1-rc1 ** 2023-05-31 08:16:57 +02:00
Bram Matthys 0816cf79bc TOPIC does not need CMD_BIGLINES anymore after commit
c32ff22a3e
[skip ci]
2023-05-31 07:33:08 +02:00
Bram Matthys e3bd914ad8 Add a link in release notes
[skip ci]
2023-05-29 19:18:33 +02:00
Bram Matthys c32ff22a3e Change the meaning of CMD_BIGLINES of yesterday.
Without CMD_BIGLINES: parameters to commands can be 510 bytes max
(but eg. strlen(parv[1])+strlen(parv[2]) can be >510, like 510*2,
 when received from servers with BIGLINES support).
If someone does set CMD_BIGLINES in their CommandAdd() then the
parameter(s) size is not limited an can be up to 16k.

This is a bit more risky than previous but i think most command
handlers can handle parameters of max BUFSIZE/512 just fine
and care less about the grand total. Also, the risk is only
from server traffic and not from user traffic. Still, we will
keep going through the source to check for issues.
2023-05-29 15:16:18 +02:00
Bram Matthys bb419b95d1 Remove set::maxbanlength as it is not useful and only confusing.
https://www.unrealircd.org/docs/Set_block#set::maxbanlength
2023-05-28 20:25:02 +02:00
Bram Matthys 23bddde416 Server w/o BIGLINES: fix line cutting at wrong place in parse2() 2023-05-28 18:37:13 +02:00
Bram Matthys 7820676616 SetDeadSocket() in close_connection()
to avoid a crash in todays code which was like:
1) exit_client gets called
2) close_connection() sets client->direction to NULL
3) a bit further it calls remove_dependents()
4) a sendto is attempted and the new code accesses
   client->direction which is unexpected to be NULL

Actually i should probably trace the cause of the sendto_one()
but that is another story ;)
2023-05-28 18:13:34 +02:00
Bram Matthys e3262c6bd8 Change default for set::topic-setter and set::ban-setter to 'nick-user-host',
previously it was set to 'nick'

Also allow the full topic length for the nick-user-host case, now that
we have BIGLINES support. For non-BIGLINES-servers this could mean a
potential cutoff of the last 20 characters of the topic, which is why we
restricted it to 340 instead of 360 for nick-user-host previously, but
that is really only in the corner case / worst case, like with max NICKLEN,
max USERLEN, max HOSTLEN, max CHANNELLEN, etc... i think we can live
with that small "problem" until all servers upgrade.
2023-05-28 17:54:44 +02:00
Bram Matthys 82dd83f7dc Use BIGLINES in RRPC when possible (and deal with splitting up again
when it is not possible, mixed server scenario).
Now a big RRPC response like server.module_list for a remote server
(44KB) fits in only 3 lines, instead of almost 100 lines.
2023-05-28 16:11:38 +02:00
Bram Matthys 2fcb5b4669 * Server to server lines can now be 16384 bytes in size when
`PROTOCTL BIGLINES` is set. This will allow us to do things more
  efficiently and possibly raise some other limits in the future.
  This 16k is the size of the complete line, including sender,
  message tags, content and \r\n. Also, in server-to-server traffic
  we now allow 30 parameters (MAXPARA*2).
  The original input size limits for non-servers remain the same: the
  complete line can be 4k+512, with the non-mtag portion limit set
  at 512 bytes (including \r\n), and MAXPARA is still 15 as well.
* I chose 16k because I don't want to first raise it to like 8k
  and then realize later that 16k would be better and raise it again.
* To receive BIGLINES in a command, you need to `CommandAdd()` with
  flags `CMD_BIGLINES`, without it you still get regular 512 max.
  This is so, because a lot of the code does not expect longer than
  512 bytes lines or in parameters, so we can gradually change that
  (where needed).
2023-05-28 15:06:32 +02:00
Bram Matthys 5e64991296 Fix CHATHISTORY BETWEEN accidentally including a message too much
Reported by progval in https://bugs.unrealircd.org/view.php?id=5952
2023-05-28 11:08:46 +02:00
Bram Matthys a4d7ca022e Update CHATHISTORY AROUND to include middle message
Reported by progval in https://bugs.unrealircd.org/view.php?id=5953
2023-05-28 10:15:51 +02:00
Val Lorentz f768b34050 chathistory: Advertize MSGREFTYPES ISUPPORT token (#251)
https://ircv3.net/specs/extensions/chathistory#isupport-tokens

The spec says they should be 'in order of decreasing preference'.
As currently the only backend is in-memory, this doesn't matter so I
picked `msgid` first (as it's less ambiguous); but this can be revisited
later if/when adding a backend which is more efficient with timestamps.
2023-05-28 05:57:36 +00:00
Bram Matthys b6179d87d0 Update release notes a bit
[skip ci]
2023-05-27 19:21:59 +02:00
Bram Matthys 1a8653de19 Fix require module not working on one side, sending SMOD too early.
Has to do with running HOOKTYPE_SERVER_CONNECT too soon, before
introducing ourselves to the other side. This bug was created in
commit ddf639836b so exists in
all UnrealIRCd 6 versions (-beta1 and up).

The hook call is now moved further down.
2023-05-27 19:14:27 +02:00
Bram Matthys 8e2527741b Update shipped libraries: c-ares to 1.19.1 2023-05-27 16:03:59 +02:00
Bram Matthys e0bce86445 Fix config check for old webirc { } block (if missing password) 2023-05-27 08:44:17 +02:00
Bram Matthys 55670c5865 Fix memory leak created today on REHASH (free the proxy blocks) 2023-05-26 16:41:02 +02:00
Bram Matthys 257ec35931 Require proxy blocks to have a name, like proxy nginx { }
Not sure yet where/when this will be used or displayed (WHOIS?
connect line?), but better require it straight from the start.
2023-05-26 16:32:23 +02:00
Bram Matthys 995d28cacb Add duplicate_security_group() function, and also:
unreal_duplicate_masks()
duplicate_nvplist()
duplicate_name_list()

And use this for when proxy::type is web, to duplicate the
exact criteria to the ban exception as mentioned in previous
commit.
2023-05-26 16:15:09 +02:00
Bram Matthys f241fef575 For proxy::type web, automatically add proxy::mask to exceptions
for blacklist, connect-flood, handshake-data-flood
(Well, unless mask::ip is used with a wildcard, due to current
 technical limitations, that will be resolved later)
2023-05-26 15:56:17 +02:00
Bram Matthys fa4b39d4aa Fix "function returns an aggregate" to make GCC happy.
Actually I don't think this was really wrong as this is an
enum, which is probably why clang does not complain...
but still... whatever....
2023-05-26 14:40:24 +02:00
Bram Matthys cf5808dc44 Error on listen::options::websocket::forward and tell to use proxy { } block.
[skip ci]
2023-05-26 14:36:20 +02:00
Bram Matthys a7cf24c45d Mention new https://www.unrealircd.org/docs/Proxy_block in release notes
and also for safety when redoing DNS and ident due to IP change,
we now:
ClearIdentLookupSent(client);
ClearIdentLookup(client);
ClearDNSLookup(client);
2023-05-26 14:26:26 +02:00
Bram Matthys fb54d4a2c6 Replace do_parse_forwarded_header() and set WEB(client)->forwarded
depending on what we get from the proxy, so it can be used later
in the websocket module for setting the user secure or not
(the latter similar to what k4be already did in the old code).
2023-05-26 13:31:01 +02:00
Bram Matthys d2f45fcaaf Move webserver proxy handling from the websocket to the webserver module.
This now requires a proxy { } block -- docs follow soon

This uses part of k4be's code still, to do the parsing,
so still only "Forwarded" and quick workaround for bug
when for=XXX is the final item.
2023-05-26 13:05:30 +02:00
Bram Matthys c537a72c10 Make proxy::mask and webirc::mask a generic mask item almost all
others in the config - https://www.unrealircd.org/docs/Mask_item
2023-05-26 12:39:11 +02:00
Bram Matthys 9aafdb7f9c Move handling of webirc { } block into new proxy { } block (allow the old name)
This is untested, as I'm first working on the rest...
2023-05-26 12:23:51 +02:00
Bram Matthys c2d465c5dd Move chunk of code from start_of_normal_client_handshake() to
a function called start_dns_and_ident_lookup(). This can then
be easily called from other places as well, like the code k4be
did in src/modules/websocket.c to handle proxies.

Side-effect is that ident lookups would now be done, if we are
configured to do so, for forwarded webirc stuff (not that I
think many people use that feature at the moment...).
2023-05-26 11:24:01 +02:00
Bram Matthys 52472a9a88 Add support for set unknown-users { } and the like:
It is now possible to override some set settings per-security group by
having a set block with a name, like `set unknown-users { }`
* You could use this to set more limitations for unknown-users:
  ```
  set unknown-users {
          max-channels-per-user 5;
          static-quit "Quit";
          static-part yes;
  }
  ```
* Or to set higher values (higher than the normal set block)
  for trusted users:
  ```
  security-group trusted-bots {
          account { BotOne; BotTwo; }
  }
  set trusted-bots {
          max-channels-per-user 25;
  }
  ```
* Currently the following settings can be used in a set xxx { } block:
  set::auto-join, set::modes-on-connect, set::restrict-usermodes,
  set::max-channels-per-user, set::static-quit, set::static-part.
2023-05-22 12:07:43 +02:00