Commit graph

  • ac69125bfd
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-08-04 12:26:26 +0200
  • 0e6fc07bd9
    Update verify_link() to return rather than set the link block in a variable. Hopefully this fixes a crash when linking (succesfully authenticated) servers, something which only happens with GCC and only for some people in some cases. Bram Matthys 2022-08-03 14:53:15 +0200
  • 7267d81278
    RPC: add spamfilter.list and spamfilter.add calls. Bram Matthys 2022-08-02 09:26:58 +0200
  • 574419a607
    For JSON spamfilter output: add "ban_duration" and "ban_duration_string" Bram Matthys 2022-08-02 09:21:36 +0200
  • eb9aff4c1c
    RPC: user.get: use JSON_RPC_ERROR_NOT_FOUND if user is not found. Bram Matthys 2022-08-02 08:31:46 +0200
  • b079aa3498
    RPC: Fix "id" not showing up in error responses. rpc_error() and rpc_error_fmt() were called with a NULL request. This also fixes logging of RPC errors to show the name of the RPC call. Bram Matthys 2022-08-02 08:28:49 +0200
  • 6749ab4e0c
    RPC: server_ban: add handling of "expire_at". Was previously always setting expiry to 5 seconds as a placeholder/TODO. Bram Matthys 2022-08-02 08:22:28 +0200
  • 970cd60698
    Use timestamp_iso8601() from server-time module (less duplicate code). Bram Matthys 2022-08-02 08:13:49 +0200
  • 6ec208a081
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-07-06 10:30:26 +0200
  • 8fae1d9306
    Show mode parameters when an IRCOp does MODE #channel, that is: for a channel they are not in, if they have the channel:see:mode:remote permission. This permission is included in all operclasses by default, just like how this is already the case for channel:see:mode:remotebanlist and other related permissions. Bram Matthys 2022-07-03 09:05:47 +0200
  • bfcde12338
    Fix internal function convert_regular_ban() to actually use the buffer that it was provided. Duh! Bram Matthys 2022-07-03 08:58:32 +0200
  • f621ca3ce4
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-07-02 13:30:02 +0200
  • 514a1f6430
    Clean up the listener code (code deduplication 3x -> 1x helper) and also fix a small memory leak on rehash due to listener->webserver not being freed. Bram Matthys 2022-07-02 08:26:20 +0200
  • db85fb13be
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-07-02 00:33:30 +0200
  • 7371498ffd
    Make auto-expansion work for IPv6 bans as well: +b A:B:C:IP -> *!*@A:B:C:IP. Reported by armyn in https://bugs.unrealircd.org/view.php?id=6147 Bram Matthys 2022-07-01 10:13:57 +0200
  • 8703d883dd
    Fix crash with ip change vs 'connect-flood' module. Bram Matthys 2022-06-28 17:28:44 +0200
  • a3fb6bc07b
    Remove leftover of a copypaste in json_expand_tkl() causing a memory leak. Bram Matthys 2022-06-27 10:51:15 +0200
  • c85f666fed
    Fix server_ban_parse_mask() returning with variables set to local storage. More precise, for extended server bans, usermask/hostmask was set to a local variable that was not defined as static char[]. This would lead to corrupt data and/or crashes. Bram Matthys 2022-06-27 10:47:58 +0200
  • 1d701cb7d4
    Remove old "TODO" item in conf file. [skip ci] Bram Matthys 2022-06-25 09:52:15 +0200
  • 29dc2e1e47
    Fix REMOTE_CLIENT_JOIN not showing up for remote joins. There was log code for "JOIN" but not for "SJOIN". Added now. Reported by ComputerTech in https://bugs.unrealircd.org/view.php?id=6141 Bram Matthys 2022-06-25 09:14:43 +0200
  • c60fdad7eb
    RPC: add server_ban.add Bram Matthys 2022-06-24 19:48:59 +0200
  • 2c1457ae6b
    RPC: add server_ban.del Bram Matthys 2022-06-24 19:18:39 +0200
  • 3d9b7e4b70
    RPC: remove tkl, split this up.. starting with server_ban. Currently available: * server_ban.list * server_ban.get with params: name="*@1.2.3.4", type="kline" Bram Matthys 2022-06-24 18:51:14 +0200
  • 22303e2063
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-06-24 15:54:48 +0200
  • 6596741638
    Add rpc.modules.default.conf, loads all required modules for JSON-RPC. Bram Matthys 2022-06-24 13:44:41 +0200
  • d3697b8684
    RPC: add tkl.list Bram Matthys 2022-06-24 13:33:05 +0200
  • 36946c6c51
    Move JSON stuff from log.c to json.c now that it is more universal. Bram Matthys 2022-06-24 13:21:27 +0200
  • fa890fb7ab Merge branch 'unrealircd-unreal60_dev' into piss60 angryce 2022-06-23 19:47:01 +0200
  • 99de2b3cee Merge branch 'unreal60_dev' of github.com:unrealircd/unrealircd into unrealircd-unreal60_dev angryce 2022-06-23 19:46:07 +0200
  • 14215e1837
    Fix two memory leaks in RPC: * on REHASH rpc-user block name was not freed * temporary construct was not freed (if params was missing) Bram Matthys 2022-06-22 14:54:51 +0200
  • fdf0d545d7
    Split rpc_client_handshake() into rpc_client_handshake_unix_socket() and rpc_client_handshake_web(). Bram Matthys 2022-06-22 13:53:15 +0200
  • 25d5ae93e6
    Do some sanity checking in webserver (fixes crash) Bram Matthys 2022-06-22 13:45:54 +0200
  • faffe7c9a8
    Fix crash in webserver Bram Matthys 2022-06-21 17:56:25 +0200
  • 7c8918e22d
    Update rpc_error() to use JsonRpcError (enum) and add more error values. Bram Matthys 2022-06-20 19:02:28 +0200
  • b38b0f5086
    Set loop.config_state to one of CONFIG_STATE_* so modules (and core) can track at what step we are during configuration file and module processing. Bram Matthys 2022-06-20 10:05:19 +0200
  • 0a4c6e877d
    Fix crash if 'websocket' is loaded without 'websocket_common'. Previously we did show a warning but we could crash a millisecond later so that wasn't particularly helpful. Now, is_module_loaded() can be used from HOOKTYPE_CONFIGPOSTTEST to detect if a module is loaded or not, contrary to us having to do it in MOD_LOAD when it is too late. So now the requirement is really enforced and also works for hot-loading as well as unloading of required modules is now prevented. Bram Matthys 2022-06-20 08:50:18 +0200
  • a14609f493
    Fix small memory leak in webserver. Bram Matthys 2022-06-20 08:25:46 +0200
  • 26ab79132b
    Fix memory leak in webserver for HTTPS POST. Bram Matthys 2022-06-19 20:47:48 +0200
  • bbf9600504
    Mention JSON-RPC documentation in early release notes. https://www.unrealircd.org/docs/JSON-RPC [skip ci] Bram Matthys 2022-06-19 20:28:51 +0200
  • 1fe6119026
    Make tld::motd and tld::rules optional. Suggested by Jellis in https://bugs.unrealircd.org/view.php?id=6072 Bram Matthys 2022-06-19 20:15:00 +0200
  • 55387a8aa4
    RPC: Fix strchr() on non-nul-terminated string (leading to OOB read) Bram Matthys 2022-06-19 17:58:28 +0200
  • 85784e8118
    Bump version to 6.0.5-git Bram Matthys 2022-06-19 16:27:41 +0200
  • 8b2caf5501
    Make listen::options::rpc implicitly enable TLS, so nobody accidentally allows JSON-RPC over insecure HTTP. Bram Matthys 2022-06-19 15:46:15 +0200
  • 5301ab5be8 Add some TODO items Bram Matthys 2022-06-19 14:43:58 +0200
  • 941439a710 Use RPC_CALL_FUNC() just like how we have CMD_FUNC() Bram Matthys 2022-06-19 10:34:20 +0200
  • c24a8e43e3 Fix outdated doxygen information on CMD_FUNC() Bram Matthys 2022-06-19 10:34:08 +0200
  • f99085fc03 RPC: add user.get() Bram Matthys 2022-06-19 10:27:16 +0200
  • 0e60b8bbfb RPC: Add ?username=xyz&password=zzz authentication as well FIXME: move URI parsing to 'webserver' and deal with unescaping %xx Bram Matthys 2022-06-10 09:55:24 +0200
  • c611f18d56 RPC: Add rpc-user { } block and do authentication Bram Matthys 2022-06-10 09:32:36 +0200
  • ab999659fc Remove some FIXME's and cleanup code a little bit. Bram Matthys 2022-06-09 18:45:58 +0200
  • feb2c9c418 Don't print "Link to server [..] closed" for RPC and control sockets. Bram Matthys 2022-06-09 18:41:23 +0200
  • e718d2021f Make websocket work over RPC Bram Matthys 2022-06-09 18:36:17 +0200
  • 853f0685ed Split off big chunk of websocket module into websocket_common module. And load the websocket_common module by default (which is just an API). Bram Matthys 2022-06-09 17:50:23 +0200
  • 7679ec7920 Get rid of cast, do things properly. Bram Matthys 2022-06-09 16:41:07 +0200
  • 0eb42155dd Limit request body to 4k by default. Bram Matthys 2022-06-09 16:38:46 +0200
  • 3e35b8e96a Small code cleanup Bram Matthys 2022-06-08 20:03:21 +0200
  • 467e3d847a Handle chunked encoding in webserver (mostly meant for RPC). Bram Matthys 2022-06-08 19:58:12 +0200
  • 4a68008b81 Rename some more: * WEB() now has handle_request() and handle_body(), makes more sense. * webserver_handle_body_data() -> webserver_handle_body() * and similar cases Bram Matthys 2022-06-08 17:58:08 +0200
  • 12f2cd8555 Rename webserver_handle_body_data() -> webserver_handle_request_body() Bram Matthys 2022-06-08 17:52:36 +0200
  • 9afdcb7ff0 Add request body handler in webserver -- only a beginning, the chunked encoding stuff is copied from the modulemanager and #if'd out. The non-chunked is not OK yet either, as it must check the Content-Length, while we currently assume a single packet == the complete request. Bram Matthys 2022-06-08 17:50:53 +0200
  • cf60b22b31 Close RPC web connection immediately when all has been sent. Bram Matthys 2022-06-08 16:43:22 +0200
  • f9794c7ed5 Make RPC API work over HTTP(S). Well, first steps, anyway. * No ACL checking yet * No chunked encoding support * No multi-frame support etc... Bram Matthys 2022-06-08 16:34:30 +0200
  • b710fb188b Add get_nvplist() function. Requested by westor in https://bugs.unrealircd.org/view.php?id=6125 Bram Matthys 2022-06-08 16:13:30 +0200
  • 5e81a6ee67 Add listener->start_handshake function pointer. This is start_of_normal_client_handshake() by default, but is start_of_control_client_handshake() for the control channel (for './unrealircd rehash' and such). Previously that was hardcoded. Bram Matthys 2022-06-08 15:59:35 +0200
  • 2bf41a47d2 Don't check for connect-flood on RPC connections. Bram Matthys 2022-06-08 13:58:54 +0200
  • 46588db89a Fix rehash crash since adding RPC code. Bram Matthys 2022-06-08 13:08:50 +0200
  • 2c8fc5e641 Move special handling of control socket to procio_server.c. Things like setting the client->status to CLIENT_STATUS_CONTROL and list_add(&client->lclient_node, &control_list); Bram Matthys 2022-06-08 12:48:46 +0200
  • df8c5cfd76 Add ability to skip connect-flood and zlined checks via listener->options with LISTENER_NO_CHECK_CONNECT_FLOOD and LISTENER_NO_CHECK_ZLINED. Bram Matthys 2022-06-08 12:29:41 +0200
  • 29eb89a528 Attach client->local->listener to a client very early, now that it is safe. This makes other code safer as well since they can assume that if the client is local (client->local) that the listener (client->local->listener) is non-NULL and safe to access until the client is completely destroyed. Bram Matthys 2022-06-08 12:26:35 +0200
  • 1d613a592c Remove freeing of client->local->listener and refdec from exit_client() to free_client(). Bram Matthys 2022-06-08 12:25:22 +0200
  • 60c83b4ba1 Move connect-flood and max-unknown-connections-per-ip into their own module. These deal with set::anti-flood::everyone::connect-flood and set::max-unknown-connections-per-ip respectively. Bram Matthys 2022-06-08 12:04:05 +0200
  • a09d4a7e88 Add CLIENT_STATUS_RPC and add SetRPC() and IsRPC(). Bram Matthys 2022-06-08 10:54:25 +0200
  • 6b30482c04 Don't apply registration timeout to *NIX domain socket connections. May want to reconsider this but.. for now.. Bram Matthys 2022-06-08 09:03:59 +0200
  • 1830f3e53f Add RPC channel.list call to show list of channels (with all details) Bram Matthys 2022-06-06 17:26:18 +0200
  • 61ba3727df JSON-RPC: Use proper error response with error codes according to the official specification (one of JSON_RPC_ERROR_*). Bram Matthys 2022-06-06 17:18:22 +0200
  • 4cd520d327 Make user.list() RPC API return a list of all users with details. This is the 1st RPC API call that actually works :D Bram Matthys 2022-06-06 16:47:09 +0200
  • 31fc2843a2 Add "rpc" module. Supports parsing from *NIX domain sockets for starters. Bram Matthys 2022-06-06 12:08:43 +0200
  • 53732e0f78 Warn if 'websocket' module is loaded without 'webserver' (= won't work). Bram Matthys 2022-06-06 12:08:05 +0200
  • b9d1af8fa0 Call config run hooks for CONFIG_LISTEN and CONFIG_LISTEN_OPTIONS also for unix domain sockets. Bram Matthys 2022-06-06 11:51:07 +0200
  • 0134c435d5 Don't apply handshake-delay to any *NIX domain socket connections, instead of only exempting *NIX domain socket control channels. Bram Matthys 2022-06-06 10:36:25 +0200
  • cbfcfa1428 Create src/modules/rpc directory Bram Matthys 2022-06-06 09:18:05 +0200
  • 97c8274695 Add RPC API (the beginning..) Bram Matthys 2022-06-06 08:41:20 +0200
  • 2397fb8a49 Split 'websocket' module up in 'webserver' and 'websocket' Bram Matthys 2022-06-06 07:51:05 +0200
  • 5615ef0449
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-06-18 17:54:48 +0200
  • 0c32151be1
    Sort modes returned by "MODE #channel" (request) Bram Matthys 2022-06-18 15:08:45 +0200
  • 4b72f375f8
    Update help.conf to include ~security-group extban (#220) alice 2022-06-17 16:06:01 +0100
  • 3a354c3410
    Fix some typos in markdown of release notes. [skip ci] Bram Matthys 2022-06-17 13:59:27 +0200
  • 88190d08c4
    ** UnrealIRCd 6.0.4 ** Bram Matthys 2022-06-17 13:29:42 +0200
  • 7fb747dcbf
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-06-08 18:24:08 +0200
  • 8ea7fcfc9f
    Fix tld::mask not working with the new form. Reported by musk. Bram Matthys 2022-06-08 08:22:14 +0200
  • b5f35dfff5
    Fix regular users being able to -o a service bot (that has umode +S). Reported by ComputerTech in https://bugs.unrealircd.org/view.php?id=6126 Bram Matthys 2022-06-08 07:35:27 +0200
  • 8fe7b1bc41
    Fix wrong security-group example in release notes for auto oper up. This should be: security-group Syzop { certfp "1234etc."; } As this is wrong: security-group Syzop { mask { certfp "1234etc."; } } Bram Matthys 2022-06-05 08:42:05 +0200
  • 28d3875aa9
    Make variables in set::reject-message and other buildvarstring() usage no longer expand shorter versions of a variable. It previously had some unintended form of magic autocomplete where $serv was handled the same way as if it was $server. This could cause issues in the long run when variables are added and the meaning of the short form changes. Bram Matthys 2022-06-05 08:15:00 +0200
  • f91da796c2
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-06-04 08:16:27 +0200
  • 020c3d1fa3
    ** UnrealIRCd 6.0.4-rc2 ** Bram Matthys 2022-06-03 18:48:52 +0200
  • 1311c8a963
    Fix connthrottle message when throttling (bug introduced in 6.0.4-rc1). Reported by westor in https://bugs.unrealircd.org/view.php?id=6121 Bram Matthys 2022-06-01 08:49:35 +0200
  • d5989695e8
    Remove last global 'buf' variables. This was already done a lot in time but it seems there were still a couple left. These are now gone as well. There seem to be no issues with the ones that were left, but it is just too easy to get it wrong. Declaring buf in function now. This should be faster anyway, since it is located on nearby memory (stack). Bram Matthys 2022-06-01 08:32:07 +0200
  • d3f655cb63
    Fix space stripping at end of connect and disconnect message, in the "extended_client_info". Was a typo, 'buf' vs 'retbuf'. Reported by westor in https://github.com/unrealircd/unrealircd/pull/217 Bram Matthys 2022-06-01 08:18:55 +0200
  • cfde4f1efa
    Merge branch 'unrealircd:unreal60_dev' into piss60 angryce 2022-06-01 00:54:13 +0200
  • 731adb308d
    set::restrict-commands: better error message if you use the same command twice (or more) Bram Matthys 2022-05-30 13:05:04 +0200