3706 Commits

Author SHA1 Message Date
Sadie Powell
b353b799a2 Fix core_dns rejecting simple hostnames. 2023-01-13 07:23:45 +00:00
Sadie Powell
b680306816 Add a new cloak system that cloaks using HMAC-SHA256.
Closes #1107.

The core of the cloaking algorithm this uses is heavily inspired
by the Plexus4 cloak_hmac_sha256 module written by Adam. I've made
a few changes to the rest of it to work more like the old InspIRCd
cloaking system as well as adding the option for configuring the
case of the character table used for cloaking.

Co-authored-by: Adam <Adam@anope.org>
Co-authored-year: 2017
2023-01-13 07:02:02 +00:00
Sadie Powell
5da15b0c5a Add the core of the new cloak implementation. 2023-01-13 07:01:03 +00:00
Sadie Powell
abc5d52f13 Const correct various functions. 2023-01-11 00:56:15 +00:00
Sadie Powell
c3e42d4e5d Make some functions that don't use this static. 2023-01-11 00:56:15 +00:00
Sadie Powell
b2d86bb8a1 Qualify auto correctly in all cases. 2023-01-10 23:30:34 +00:00
Sadie Powell
b25cd86ddf Avoid copying shared_ptr<IOHookProvider> when not necessary. 2023-01-10 21:27:29 +00:00
Sadie Powell
1b2916c845 Avoid copying shared_ptr<ConfigTag> when not necessary. 2023-01-10 21:27:18 +00:00
Sadie Powell
a83223378c Fix calling the base Set/Unset implementation in ListExtItem. 2023-01-10 20:28:29 +00:00
Sadie Powell
610930face Deduplicate sending the raw I/O logging warning. 2023-01-09 18:33:37 +00:00
Sadie Powell
8831595e1a Rework how users are assigned to connect classes.
- Move core connect class checks and <performance:clonesonconnect>
  to the core_user module.
- Add pre-change and post-change events for when a connect class
  changes.
- Split explicit class changing out into its own method.
- Remove the need to almost always call CheckClass after SetClass.
- Add use counting to the connect class instead of relying on the
  shared_ptr use count.
2023-01-08 16:28:40 +00:00
Sadie Powell
9e985f5979 Add some overloads of Find{Nick,UUID,} for local/remote users. 2023-01-07 04:36:31 +00:00
Sadie Powell
756ed58b77 Silence a Valgrind warning in SSLIOHook.
Closes #2011.
2023-01-05 17:23:54 +00:00
Sadie Powell
d7182c584c Add a helper class for creating a reference to a DNS manager. 2023-01-05 00:41:04 +00:00
Sadie Powell
26c6a8811b Allow specifying milliseconds and a timespec in the server-time API. 2023-01-04 19:56:57 +00:00
Sadie Powell
b1e6084b2d Fix getting the full snomask and mode lists. 2023-01-02 22:49:07 +00:00
Sadie Powell
45ef938965 Get rid of the virtual Has*Permission methods.
These are no longer needed now we store privs for the remote oper.
2023-01-02 21:49:20 +00:00
Sadie Powell
4a468f26cc Allow synching oper privileges between servers. 2023-01-02 21:49:20 +00:00
Sadie Powell
137dbe2fdc Allow getting all of the oper command/mode/snomask privs. 2023-01-02 21:05:19 +00:00
Sadie Powell
37ce48e61a Add some useful aliases to OperType. 2023-01-02 19:48:14 +00:00
Sadie Powell
6d6ccfd24b Add a method for unescaping tags. 2023-01-02 19:22:40 +00:00
Sadie Powell
d048778f78 Merge branch 'insp3' into master. 2023-01-01 13:19:45 +00:00
Sadie Powell
1106b97c41 Release v3.15.0. 2022-12-30 11:33:00 +00:00
InspIRCd Robot
2b810b412a Update copyright headers. 2022-12-30 11:31:28 +00:00
Sadie Powell
f547805018 Rename the SimpleExtItem type parameter to be more descriptive. 2022-12-27 19:29:43 +00:00
Sadie Powell
a752f952af Allow overriding the deleter in ListExtItem. 2022-12-27 19:29:43 +00:00
Sadie Powell
72b5aec5d5 Add the SimpleExtItem::GetRef method. 2022-12-27 19:29:43 +00:00
Sadie Powell
75de6e0d5c Add the ListExtItem extension type. 2022-12-27 18:19:10 +00:00
Sadie Powell
1c2e79ea80 Move cull_delete to be inside of Cullable. 2022-12-27 14:12:10 +00:00
Sadie Powell
193408e3b4 Replace the unused padding argument of Percent::Encode with upper. 2022-12-27 13:37:38 +00:00
Sadie Powell
b1eb362d83 Refactor SocketEngine slightly.
- Remove pointless shutdown() wrapper.
- Remove pointless bounds checking function.
- Make Bind and Listen take an EventHandler instead of a fd.
- Add nullability attributes to every method.
2022-12-25 22:41:28 +00:00
Sadie Powell
7673db8d1b Pass the client/server sockaddr around as a ref instead of a ptr. 2022-12-25 13:06:50 +00:00
Sadie Powell
12518ce966 Add nullability attributes to UserManager. 2022-12-25 12:48:26 +00:00
Sadie Powell
14ab989acf Remove the string_view utility header from the global header. 2022-12-23 19:10:30 +00:00
Sadie Powell
997684e183 Fix a Doxygen documentation typo. 2022-12-20 17:17:47 +00:00
Sadie Powell
8025a69a53 Allow remapping mode and extban characters at load time.
Closes #1970.
2022-12-20 16:02:12 +00:00
Sadie Powell
abc1e463a7 Move {From,To}Network from StringExtItem to SimpleExtItem. 2022-12-20 10:50:31 +00:00
Sadie Powell
43d48a2e98 Move extension types to their own header to speed up build times. 2022-12-19 14:18:30 +00:00
Sadie Powell
2ddb623198 Use in_port_t instead of int/unsigned int/long. 2022-12-18 18:47:28 +00:00
Sadie Powell
3588a46e6f We actually want ADDRESS_FAMILY not SOCKET_ADDRESS for sa_family_t.
Apparently I can not read headers properly.
2022-12-18 13:44:45 +00:00
Sadie Powell
d8b4414ee1 Rework the levels things are logged at to make more sense. 2022-12-18 13:43:33 +00:00
Sadie Powell
cf3466963b Add is_local to the sockaddrs union. 2022-12-18 01:13:47 +00:00
Sadie Powell
55c1974da3 Use SOCKET_ADDRESS instead of u_short.
These are typedefs but the former is more correct.
2022-12-18 00:50:40 +00:00
Sadie Powell
bfee808f26 Fix conflicting with a predefined value on Windows.
STRICT is already defined on Windows so we'll need to do something
else here. Thanks Microsoft.
2022-12-11 10:31:00 +00:00
Sadie Powell
3c6e24665f Move <oper:autologin> from m_sslinfo to core_oper and rework.
- Promote autologin to a core concept with visibility in events.

- Replace the binary yes/no value with strict/relaxed/never. This
  intentionally breaks v3 oper block autologin as admins will need
  to review them for the security implications of the new behaviour.
2022-12-11 10:14:33 +00:00
Sadie Powell
9d35da3e84 Move password checking from core_oper into OperAccount. 2022-12-10 15:30:51 +00:00
Sadie Powell
86b4a0853e Remove the unused Extensible* parameter to PassCompare/OnPassCompare. 2022-12-10 15:22:15 +00:00
Sadie Powell
52e048b214 Allow modules to ignore any checks from OnPreOperLogin. 2022-12-10 14:58:48 +00:00
Sadie Powell
513309fc68 Fix building with the Intel C++ compiler.
- Fix adding -Wshadow in the compiler flags twice.
- Detect the new Clang-based Intel compiler as well as the old one.
- Silence some deprecation warnings using Intel syntax.
2022-12-10 06:58:39 +00:00
Sadie Powell
5e44188857 More const correctness work. 2022-12-08 10:19:47 +00:00