Commit graph

  • a3efb70d31
    Fixes for Windows build: add extbans/flood and all the RPC modules. [skip ci] Bram Matthys 2023-04-07 14:37:00 +02:00
  • 290c5d4b72
    Fix Windows makefile. [skip ci] Bram Matthys 2023-04-07 14:27:14 +02:00
  • 854c5976d1
    Chanmode +F: re-apply profiles on REHASH (in case anything changed) TODO: ideally we would only do this if there was a change at all, but ah well. Bram Matthys 2023-04-07 14:07:25 +02:00
  • 3538ca9547
    Fix bug in unrl_utf8_make_valid() where on invalid UTF8 it would use the replacement character (good) but then stop processing the rest of the string (bad). This only happened if called with strict=0, which only happens in the JSON and logging routines. So not in user-exposed stuff like the websocket code. Bram Matthys 2023-04-05 09:40:10 +02:00
  • 4de91d49df
    Forgot 'git add' Bram Matthys 2023-04-05 08:07:18 +02:00
  • 254afbb9c6
    Make set::hide-ban-reason not affect opers (eg. show full gline reason). Suggested by Chris_dc in https://bugs.unrealircd.org/view.php?id=6252 Bram Matthys 2023-04-05 07:24:31 +02:00
  • e8aef70f03
    Fix crash on +f modes merging (SJOIN) due to the 6.1.0 +f/+F changes. Reported by Valware. Bram Matthys 2023-04-05 07:21:52 +02:00
  • c5a763de06
    mask vs match in webirc Bram Matthys 2023-04-04 19:37:07 +02:00
  • b07c739fa7
    Add new +e ~flood:<floodtype(s)>:<mask> to exempt from +f/+F checks. For example: +e ~flood:*:~account:TrustedBot Bram Matthys 2023-04-02 19:19:15 +02:00
  • a19b2aebf6
    New cmode.flood_type_action which can be used to indicate a channel mode can be used from +f/+F as an action. You need to specify for which flood type your mode is, eg cmode.flood_type_action = 'j'; for joinflood. Bram Matthys 2023-04-02 18:14:45 +02:00
  • a9b71b58cb
    Add RPC 'issuer' logging in CHGIDENT, CHGHOST, CHGNAME, SVSMODE for user.set_username, user.set_vhost, user.set_realname, user.set_mode. And some early work for other stuff that doesn't work yet. Bram Matthys 2023-04-02 16:18:34 +02:00
  • 1e315bb953
    Add and use command_issued_by_rpc() helper function for internal logging of commands issued by JSON-RPC. Bram Matthys 2023-04-02 16:03:50 +02:00
  • e67f5b6c39
    Prepare all user.* with mtag_add_issued_by() for unrealircd.org/issued-by. The code further up still needs to be changed, though. Bram Matthys 2023-04-02 15:56:48 +02:00
  • d25d2a23be
    Minor cleanup: use kick_user() from channel.kick call instead of emulating an IRC command through do_cmd(). Function was added earlier in a8534a6063 Bram Matthys 2023-04-02 12:14:52 +02:00
  • 9eac6797c6
    Add unrealircd.org/issued-by for KICK from JSON-RPC Bram Matthys 2023-04-02 12:12:16 +02:00
  • 50c3ed2c24
    Add unrealircd.org/issued-by if using RPC call channel.set_mode This also changes the set_channel_mode() function to have an extra arguments MessageTag *mtags (2nd parameter). Bram Matthys 2023-04-02 12:06:52 +02:00
  • 0b8f0deb05
    SAPART: add unrealircd.org/issued-by, and add RPC-specific logging Bram Matthys 2023-04-02 12:01:29 +02:00
  • 6ee941fa4c
    SAJOIN: add unrealircd.org/issued-by, and add RPC-specific logging (some code will probably be moved to a helper function later) Bram Matthys 2023-04-02 11:52:24 +02:00
  • f007933348
    Document mtag_add_issued_by() and allow for some future case we don't use yet. [skip ci] Bram Matthys 2023-04-02 11:51:09 +02:00
  • 4a5b8b3639
    +F: the no-flood-limit profile is called "off" now (was: "none") Bram Matthys 2023-04-02 11:02:59 +02:00
  • cd3cf7e97c
    Chanmode +F: Lower nick change limit in profiles, now that only real nick changes are counted and not forced ones like SVSNICK. Bram Matthys 2023-04-02 10:59:52 +02:00
  • fa4d86009c
    Move set::modef-boot-delay to set::anti-flood::channel::boot-delay and the new set::modef-split-delay to set::anti-flood::channel::split-delay. See https://www.unrealircd.org/docs/Channel_anti-flood_settings#config Bram Matthys 2023-04-02 10:25:25 +02:00
  • 22a632fb88
    Fix memory leak in RPC module on server disconnect. The "rrpc" moddata was not freed, which contained the list of RPC modules on a remote server. Bram Matthys 2023-04-02 08:32:51 +02:00
  • b914997a1c
    Update cmode.free_param definition to fix memleak due to yesterdays commit. And update release notes technical note so it actually refers to the correct channel mode function :D Bram Matthys 2023-04-02 08:24:00 +02:00
  • 8ea50d38a3
    Change a character and force rebuild Bram Matthys 2023-04-01 18:55:08 +02:00
  • 8776557b3d
    JSON-RPC: make server.list use a default max detailed level, the same one as server.get. This list is likely to be small, anyway. This is how it was with <6.0.8. Reported by Lord255. Bram Matthys 2023-04-01 18:16:10 +02:00
  • cab472e480
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2023-04-01 17:54:48 +02:00
  • b093ba5375
    Set version to 6.1.0-git. Bram Matthys 2023-04-01 17:29:48 +02:00
  • ce75ddd167
    Bump UNREAL_VERSION_TIME (been a while) [skip ci] Bram Matthys 2023-04-01 17:05:33 +02:00
  • 8f1dc52c20
    Mention that cmode.put_param has an API change [skip ci] Bram Matthys 2023-04-01 17:04:43 +02:00
  • 7b7d436bba
    Add support for set::anti-flood::channel::default-profile https://www.unrealircd.org/docs/Channel_anti-flood_settings#Default_profile Bram Matthys 2023-04-01 16:56:37 +02:00
  • 2f7bb2e72d
    Some reformatting of release notes [skip ci] Bram Matthys 2023-04-01 13:37:50 +02:00
  • 22691a458b
    Don't count forced nick changes in floodtype 'n' in chanmode +f/+F. These were already not counted for set::anti-flood::xx::nick-flood and it makes sense. Benefit of this is that limits for floodtype 'n' can be set tighter, as now it is really only about manual (voluntarily) nick changes. Bram Matthys 2023-04-01 13:25:12 +02:00
  • e4cdc4c0dd
    Update release notes a bit on JSON request logging and unrealircd.org/issued-by [skip ci] Bram Matthys 2023-04-01 13:20:11 +02:00
  • a83cd474af
    Change RPC logging format for rpc.RPC_CALL: From: [rpc] Client RPC:adminpanel (Syzop): RPC call channel.set_mode: channel='#test', modes='+b', parameters='some!silly@ban' To: [rpc] RPC call channel.set_mode by RPC:adminpanel (Syzop): channel='#test', modes='+b', parameters='some!silly@ban' Bram Matthys 2023-04-01 13:01:35 +02:00
  • 1bf34ae01b
    Log parameters in rpc.RPC_CALL: [rpc] Client RPC:adminpanel (Syzop): RPC call channel.set_mode: channel='#test', modes='+b', parameters='some!silly@ban' Bram Matthys 2023-04-01 12:59:20 +02:00
  • 2b39777815
    Logging: Log the issuer in rpc.RPC_CALL, when it is available. [rpc] Client RPC:adminpanel (Syzop): RPC call channel.set_mode Bram Matthys 2023-04-01 12:39:16 +02:00
  • 7d7974f800
    Get rid of unneeded buffer copying, if Jansson library >= v2.1 Bram Matthys 2023-04-01 12:29:59 +02:00
  • 275cb97cfc
    For JSON-RPC with UNIX Domain sockets, split on \n (newline). This so multiple parallel requests can be handled properly. Bram Matthys 2023-04-01 12:24:47 +02:00
  • 89f75bd6e7
    Fix some warnings: change an int to time_t and vice-versa Bram Matthys 2023-04-01 09:51:53 +02:00
  • a6820b4a8d
    Fix weird +F values when two channels merge. This was a forgotten TODO item for cmodef_dup_struct(), more netsync tests are still to follow. Bug reported by Lord255. Bram Matthys 2023-04-01 09:06:37 +02:00
  • 4e49323e88
    Fix crash on rpc-user { } block without a name. Bram Matthys 2023-04-01 08:58:17 +02:00
  • 7a50f963f8
    Make channel.set_topic use the issuer internally. No logging or other changes yet, just unrealircd.org/issued-by testing. Bram Matthys 2023-03-31 14:27:56 +02:00
  • a3c151a16a
    RPC: add rpc.set_issuer, eg set to logged in user on the admin panel. This so UnrealIRCd knows who is issuing the commands. This information is then passed on to unrealircd.org/issued-by and is planned to be used by the logging system too. Bram Matthys 2023-03-31 12:49:25 +02:00
  • 5871bd9463
    Initial work on unrealircd.org/issued-by message tag. This will communicate the original issuer of a command. For example an "SAMODE #test +s" results in a SAMODE coming from :maintest.test.net MODE ....etc.... And with this feature, we will communicate the IRCOp who did it: @unrealircd.org/issued-by=OPER:Syzop..etc.... This tag is only sent to servers and to IRCOps, not to ordinary users. Bram Matthys 2023-03-31 12:07:43 +02:00
  • 1ca0b76bb5
    Validate value of rpc-user THISNAME { } Bram Matthys 2023-03-31 11:54:12 +02:00
  • c9f697e3ca
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2023-03-31 11:25:31 +02:00
  • 8c6c9b6206
    Fix SAMODE showing tags for the person who executed the SAMODE instead of the server executing the MODE. Eg unrealircd.org/userhost was set. This occured because the client = &me; was done after the message tag preparation, now moved up so it's done before. Bram Matthys 2023-03-31 11:20:09 +02:00
  • eeaa4b53b8
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2023-03-30 21:47:08 +02:00
  • 9ab876133d
    Add wildcard support to blacklist-module. This also removes the following warning as a side-effect: "blacklist-module for '%s' but module does not exist anyway". Bram Matthys 2023-03-30 17:41:02 +02:00
  • b099033c1b
    Load RPC modules by default but don't enable webserver or RPC sockets. See release notes: +* The RPC modules are enabled by default now. This so remote RPC works + from other IRC servers for calls like modules.list. The default + configuration does not enable the webserver nor does it cause + listening on any socket for RPC, for that you need to follow the + [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) instructions. Bram Matthys 2023-03-30 17:34:39 +02:00
  • 553d826ab3
    Update release notes [skip ci] Bram Matthys 2023-03-30 17:23:55 +02:00
  • bfee61d52d
    Fix dereferencing the wrong variable in a config_error() Bram Matthys 2023-03-30 16:58:44 +02:00
  • b51c8315fd
    Add and use set::modef-split-delay which makes +f ignore join-flood for this amount of seconds (default: 75) when a server splits. This helps in case a server dies and the clients reconnect to the other servers, causing a join-flood to be triggered needlessly. Of course, OTOH disabling a flood protection temporarily is not ideal, but after seeing it being triggered too often and requiring manual intervention in many +f/+F channels, this is the best option I think, if we want +f/+F to work as painless as possible. Bram Matthys 2023-03-30 16:51:39 +02:00
  • aae8306ef6
    Do some sanity checking on extban names: max 32 characters and a-z, 0-9, _, - Bram Matthys 2023-03-29 16:39:16 +02:00
  • f4755fe587
    Do some sanity checks on flood profile names max length 24, and every character is a-z, 0-9, -, _ Bram Matthys 2023-03-29 16:34:36 +02:00
  • a5b6365ef0
    Assume +f profile "normal" always exists, since that is the case. Also fix some "NULL check but dereferenced before" warnings. Bram Matthys 2023-03-29 16:24:57 +02:00
  • 8ff5fb62fb
    Get rid of some shadow (bug in +f config profile handling) Bram Matthys 2023-03-29 16:23:34 +02:00
  • 55350fe3a3
    Fix due to recent +f rewrite: add check for [ at start, fixes OOB read. Bram Matthys 2023-03-29 09:50:10 +02:00
  • 36ac2301c3
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2023-03-28 14:36:44 +02:00
  • 53aedf2b3f
    Update release notes [skip ci] Bram Matthys 2023-03-27 13:23:23 +02:00
  • abb6fcfcb5
    RPC: user.list and user.get now have optional object_detail_level. This is an integer which decides the amount of details in the response object. Bram Matthys 2023-03-27 13:08:16 +02:00
  • f9af852c43
    Again a fix for JSON logging, so object_detail_level has same result as 6.0.6. Bram Matthys 2023-03-27 12:24:12 +02:00
  • 783bdfb741
    Fix JSON logging using the correct object_detail_level (same result as 6.0.6) Bram Matthys 2023-03-27 10:13:43 +02:00
  • a18bb04f45
    Bump rpc/channel module version to 1.0.5 [skip ci] Bram Matthys 2023-03-27 09:57:07 +02:00
  • 957af0909b
    RPC: channel.get and channel.list now have optional object_detail_level. This is an integer which decides the amount of details in the response object. Bram Matthys 2023-03-27 09:21:29 +02:00
  • 98868dbbe9
    Some leftover changes for release notes [skip ci] Bram Matthys 2023-03-27 09:15:00 +02:00
  • 5d25888c71
    Update release notes [skip ci] Bram Matthys 2023-03-26 19:49:49 +02:00
  • 5c84728a32
    Update release notes [skip ci] Bram Matthys 2023-03-26 19:44:46 +02:00
  • 8e6c38f09a
    Potentially fix +f 'r' Bram Matthys 2023-03-26 18:54:36 +02:00
  • ccd9fc4b25
    Make MODE #channel +F show the combined effective view of +f and +F. Actually it accepts the following variations for this query: MODE #test f MODE #test +f MODE #test F MODE #test +F As long as it is like that (with no parameter) we will show details. Details are shown for all of the four possible combinations of having or not having +f and +F. Bram Matthys 2023-03-26 17:16:14 +02:00
  • 67f61e7444
    Retain sorting order when when set_channel_flood_profile() overwrites an existing +F profile. Bram Matthys 2023-03-26 16:43:45 +02:00
  • 4ebdc7cd5b
    Don't allow subtype 't' and 'r' in +F profiles for now due to technical reasons. If you want those, then use +f. (See source) Bram Matthys 2023-03-26 16:03:35 +02:00
  • 7f84bf7a39
    floodprot minor code cleanup (chp -> fld) Bram Matthys 2023-03-26 15:57:44 +02:00
  • aa48b4d9d8
    Make +F and +f work together (+f subtypes override +F settings) Bram Matthys 2023-03-26 15:56:52 +02:00
  • 1590628488
    Drop the alt-actions +m and +M for the CTCP floodtype. When a channel CTCP flood happens and there is an +f with the 'c' floodtype, we set channel mode +C by default. Alternative action possiblities were +m and +M. I don't think anyone really used those alt actions for CTCP because makes little sense to set the channel +m/+M on a CTCP flood when there is +C which has far less impact. Bram Matthys 2023-03-26 15:37:32 +02:00
  • 972046448a
    Channelmode +f code cleanups: make a single parse_channel_mode_flood() function that handles all of is_ok(), conv_param() and put_param(). Bram Matthys 2023-03-26 13:33:04 +02:00
  • b03b122348
    Initial work on set::anti-flood::channel likely with bugs and no validation Bram Matthys 2023-03-26 09:34:51 +02:00
  • 5db1ce00b1
    Handle the HOOKTYPE_CONFIGRUN and TEST for CONFIG_SET_ANTI_FLOOD first. Bram Matthys 2023-03-26 09:00:35 +02:00
  • c9fddc51f9
    Add channel mode +F <flood-profile> Bram Matthys 2023-03-25 18:35:46 +01:00
  • b9be185f0a
    Make channel mode +f ban "unknown-users" first on a join flood, if the join flood is caused by >75% of "unknown-users". This to see if that will take care of the flood without harming the "known-users" group. And naturally, do something similar for message floods and nick floods. Bram Matthys 2023-03-25 13:29:17 +01:00
  • 04ce8f8ed7
    Add helper functions Bram Matthys 2023-03-25 12:19:26 +01:00
  • 748f381d81
    Use X509_check_host() in OpenSSL 1.1.0 and later and don't use it for OpenSSL 1.0.2 anymore, 1.0.2 will use the fallback version. This changes the include file. Bram Matthys 2023-03-25 12:15:06 +01:00
  • 78ce692357
    Move ban_exists() to the core (was a helper function in channeldb) Bram Matthys 2023-03-25 10:38:05 +01:00
  • 5f36221869
    Add OpenSSL include to fix compile warning. X509_check_host() requires openssl/x509.h -- well except on newer OpenSSL's apparently :D Bram Matthys 2023-03-25 10:31:30 +01:00
  • bfd9650abf
    Don't use X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS to fix compile problems. I guess it's not that important so not doing #if defined() checks for it. Compile problem reported by val. Bram Matthys 2023-03-25 10:22:28 +01:00
  • 24622144b1
    Bump version to 6.0.8-git [skip ci] Bram Matthys 2023-03-25 09:19:20 +01:00
  • 83d2498ec8
    Add configure check for and use X509_check_host() instead of always using our own implementation (that is not really ours, by the way). Bram Matthys 2023-03-25 08:28:29 +01:00
  • d5aa0b61f1
    Bump max length of log entries from 8k to 16k (for example for logging a 8k+512 bytes line during debugging). Bram Matthys 2023-03-25 07:39:44 +01:00
  • b51a533ccf
    In WHOWAS show the normal host (vhost/cloakedhost) to IRCOps now that the realhost/IP is communicated on a separate line. This so you now can see both vhost/cloakedhost and realhost as an IRCOp in a single WHOWAS request. Bram Matthys 2023-03-25 07:32:43 +01:00
  • 89611887cb
    Previous fix for big tags was insufficient. 4K+4K+512 rule should now be OK. This also adds the MAXLINELENGTH define which is set to 4K+4K+512, it can be used when you are dealing with complete lines (quite rare in the code, mostly in socket code and labeled response). And now also #define READBUFSIZE MAXLINELENGTH but it is used beyond read buffers, als in write buffers of course. Bram Matthys 2023-03-25 07:30:22 +01:00
  • da3c1c6544
    ** UnrealIRCd 6.0.7 ** Bram Matthys 2023-03-24 13:26:29 +01:00
  • 7194799f93
    Fix valid_vhost() rejecting user@host. Reported by Lord255. Bram Matthys 2023-03-24 13:19:57 +01:00
  • c4059a4b13
    Update release notes [skip ci] Bram Matthys 2023-03-24 08:56:46 +01:00
  • a743c5956d
    Buy a brain.. [skip ci] Bram Matthys 2023-03-22 15:32:06 +01:00
  • ed14d044e9
    Fix crash in SVSO due to change from earlier today [skip ci] Bram Matthys 2023-03-22 15:31:21 +01:00
  • 2d4c064c59
    Makefile.windows: add missing standard-replies.dll [skip ci] Bram Matthys 2023-03-22 15:11:11 +01:00
  • 2a719df7f0
    Update release notes; mention windows libs [skip ci] Bram Matthys 2023-03-22 14:43:43 +01:00
  • 9a171f2c79
    Update release notes [skip ci] Bram Matthys 2023-03-22 10:59:22 +01:00
  • e83c610b39
    Add valid_vhost() and validate oper::vhost too just like vhost::vhost. Actually make them both use this same function, even thought he original vhost::vhost check was a bit more informational. Bram Matthys 2023-03-22 10:24:41 +01:00