]> jfr.im git - irc/atheme/atheme.git/log
irc/atheme/atheme.git
2 years agodon't do_sethost_all in NS VHOST for unverified accounts origin/jess/ns-vhost-unverified
jesopo [Mon, 28 Mar 2022 15:02:41 +0000 (15:02 +0000)] 
don't do_sethost_all in NS VHOST for unverified accounts

2 years agoconfigure: --enable-warnings: check for -Wno-declaration-after-statement
Aaron Jones [Sat, 5 Mar 2022 05:16:23 +0000 (05:16 +0000)] 
configure: --enable-warnings: check for -Wno-declaration-after-statement

Clang trunk is issuing dozens of these diagnostics for every single
compilation unit, warning that declaring variables after a statement
is not supported in versions of C before C99.

However, this is a C99 codebase, and we're using AC_PROG_CC_C99.
Disable this diagnostic.

2 years agolibmowgli-2/: bump to latest HEAD
Aaron Jones [Mon, 28 Feb 2022 23:29:26 +0000 (23:29 +0000)] 
libmowgli-2/: bump to latest HEAD

2 years agom4/atheme-featuretest-warnings.m4: check for -Wno-reserved-identifier
Aaron Jones [Thu, 24 Feb 2022 00:25:04 +0000 (00:25 +0000)] 
m4/atheme-featuretest-warnings.m4: check for -Wno-reserved-identifier

Clang 14 with --enable-warnings is emitting several of these
diagnostics for every single compilation unit, due to how
libmowgli names its variables. This is pointlessly annoying.

2 years agomodules/backend/corestorage: respect general::db_save_blocking
Aaron Jones [Sat, 19 Feb 2022 00:48:11 +0000 (00:48 +0000)] 
modules/backend/corestorage: respect general::db_save_blocking

We're not just called from the periodic commit timer, but also
on rehash, which includes some modreloads too (when reloading a
module that has configuration options).

We should always use a blocking save regardless of what caused
the save to happen, rather than just test in the periodic commit
timer callback.

This makes running under Valgrind much more amenable.

Fixes: b427d04059d4d4f7b396
2 years agolibathemecore/logger: silence false positive memory leak diagnostic
Aaron Jones [Thu, 17 Feb 2022 13:03:10 +0000 (13:03 +0000)] 
libathemecore/logger: silence false positive memory leak diagnostic

2 years agomodules/nickserv/verify: redefine messages as macros
Aaron Jones [Tue, 1 Feb 2022 23:38:08 +0000 (23:38 +0000)] 
modules/nickserv/verify: redefine messages as macros

This was (correctly) triggering -Wformat-security diagnostics because
they were not string literals.

Fixes: b40775a303c7bbcb027e
2 years agoSECURITY.md: update for 7.2.12 release
Nicole Kleinhoff [Tue, 1 Feb 2022 02:20:11 +0000 (02:20 +0000)] 
SECURITY.md: update for 7.2.12 release

2 years agoSECURITY.md: update PGP key for ilbelkyr
Nicole Kleinhoff [Tue, 1 Feb 2022 02:16:59 +0000 (02:16 +0000)] 
SECURITY.md: update PGP key for ilbelkyr

2 years agoDon't save last seen times for logged-in nicks
Ed Kellett [Wed, 19 Jan 2022 20:51:53 +0000 (20:51 +0000)] 
Don't save last seen times for logged-in nicks

Last seen times are currently updated by, amongst other things, the
expiry check, which has the effect of updating every logged in nick and
user's line in the database every hour. This makes life much harder for
incremental backup systems -- by my very rough measurement, if a DB save
without an expiry check costs 1MB, a save that includes one will cost
10. Atheme databases aren't huge to begin with, but I think a tenfold
reduction is still worth chasing.

Edited by @aaronmdjones: Add NEWS entry and script to migrate back to
the v7.2 database format, should people wish to downgrade.

Closes #856

2 years agomodules/alis: refuse unprivileged searches for oper-only cmodes
Aaron Jones [Fri, 21 Jan 2022 17:48:38 +0000 (17:48 +0000)] 
modules/alis: refuse unprivileged searches for oper-only cmodes

2 years agomodules/alis: move all mode arg parsing into its own function
Aaron Jones [Fri, 21 Jan 2022 17:47:49 +0000 (17:47 +0000)] 
modules/alis: move all mode arg parsing into its own function

2 years agoinclude/atheme/privs.h: tidy up
Aaron Jones [Tue, 18 Jan 2022 12:18:23 +0000 (12:18 +0000)] 
include/atheme/privs.h: tidy up

Align macro values, clean up some comments, alphabetise privileges
within each block, shift some flags around.

2 years agolibathemecore/ptasks.c: stats c: show uplink host
Aaron Jones [Tue, 18 Jan 2022 12:14:27 +0000 (12:14 +0000)] 
libathemecore/ptasks.c: stats c: show uplink host

This is already gated behind PRIV_SERVER_AUSPEX, which OperServ
SPECS describes as "view concealed information about servers".

Also, you can already obtain this information from `stats f`
(shows all active file descriptors associated with connections,
which includes endpoint IP addresses), which is gated behind the
same privilege.

2 years agolibathemecore/ptasks.c: handle_stats(): use consistent case labels
Aaron Jones [Tue, 18 Jan 2022 12:13:08 +0000 (12:13 +0000)] 
libathemecore/ptasks.c: handle_stats(): use consistent case labels

Some of the case labels were uppercase followed by lowercase,
some of them were the other way around. Use a consistent scheme.

2 years agomodules/contrib/: bump to latest HEAD
Aaron Jones [Sat, 22 Jan 2022 17:01:02 +0000 (17:01 +0000)] 
modules/contrib/: bump to latest HEAD

2 years agoAllow hooks to force account expire
jesopo [Sun, 28 Nov 2021 13:45:48 +0000 (13:45 +0000)] 
Allow hooks to force account expire

Edited and committed by @aaronmdjones: Other general code cleanup;
clarify that if a hook forces account expiry, the destructor for
the myuser object will take care of logging them out (if they are
logged in). Also account for the fact that they may be logged in
by having the log message include their login count. Finally, don't
let a hook prevent the expiry of an unverified account.

Closes #847

2 years agotell anything logged in to an account when it has been (F)VERIFYed (#841)
Jess Porter [Sun, 16 Jan 2022 21:39:44 +0000 (21:39 +0000)] 
tell anything logged in to an account when it has been (F)VERIFYed  (#841)

* tell anything logged in to an account when it has been (F)VERIFYed

* don't thank on fverify

2 years agoMerge pull request #854 from skizzerz/chm_nonotice
Aaron Jones [Thu, 13 Jan 2022 02:06:37 +0000 (02:06 +0000)] 
Merge pull request #854 from skizzerz/chm_nonotice

Support +T (CMODE_NONOTICE) in ircd-seven

2 years agoSupport +T (CMODE_NONOTICE)
Ryan Schmidt [Thu, 13 Jan 2022 01:52:45 +0000 (18:52 -0700)] 
Support +T (CMODE_NONOTICE)

This was already defined in the charybdis.h file, so just need to make
the rest of atheme recognize the mode.

2 years agomodules/operserv/modmanager: fix relatively harmless memory leak
Aaron Jones [Mon, 10 Jan 2022 06:03:12 +0000 (06:03 +0000)] 
modules/operserv/modmanager: fix relatively harmless memory leak

If passed a list consisting entirely of non-reloadable modules, we would
leak approximately up to 24 bytes of memory each time. Discovered manually
during reading the function.

Fixes: e2fd6f2a8959fb89acb2
2 years agoincrease importance of vhost-related user_identified hooks (#820)
Jess Porter [Thu, 30 Dec 2021 00:11:14 +0000 (00:11 +0000)] 
increase importance of vhost-related user_identified hooks (#820)

2 years agouse account name (with correct casing) for NS FREEZE logs (#836)
Jess Porter [Wed, 29 Dec 2021 22:40:02 +0000 (22:40 +0000)] 
use account name (with correct casing) for NS FREEZE logs (#836)

* use account name (with correct casing) for NS FREEZE logs

* action and reason can be const too

2 years agoMerge pull request #819 from jesopo/last-seen-hidden
Jess Porter [Wed, 29 Dec 2021 19:27:30 +0000 (19:27 +0000)] 
Merge pull request #819 from jesopo/last-seen-hidden

simplify NS INFO timestamp logic, indicate auspex being used

2 years agototally rewrite last/user seen code, express when a timestamp is hidden
jesopo [Wed, 29 Dec 2021 19:14:08 +0000 (19:14 +0000)] 
totally rewrite last/user seen code, express when a timestamp is hidden

2 years agoImplement certfp list length max check (#848)
Jess Porter [Wed, 15 Dec 2021 16:09:00 +0000 (16:09 +0000)] 
Implement certfp list length max check (#848)

Implement certfp list length max check

2 years agoMerge pull request #826 from examknow/honor-no-login-limit
jess porter [Thu, 2 Dec 2021 12:32:29 +0000 (12:32 +0000)] 
Merge pull request #826 from examknow/honor-no-login-limit

services.c/enforce.c: honor no login limit flag

2 years agoservices.c/enforce.c: honor no login limit flag
David Schultz [Thu, 2 Sep 2021 18:16:11 +0000 (13:16 -0500)] 
services.c/enforce.c: honor no login limit flag

2 years agoMerge pull request #845 from jesopo/return-log-oldmail
Aaron Jones [Mon, 15 Nov 2021 13:25:33 +0000 (13:25 +0000)] 
Merge pull request #845 from jesopo/return-log-oldmail

show oldmail in NS RETURN logs

2 years agoshow oldmail in NS RETURN logs
jesopo [Mon, 15 Nov 2021 12:15:07 +0000 (12:15 +0000)] 
show oldmail in NS RETURN logs

2 years agoMerge pull request #833 from edk0/sasl-pending
Aaron Jones [Sun, 17 Oct 2021 23:26:16 +0000 (23:26 +0000)] 
Merge pull request #833 from edk0/sasl-pending

Avoid login desyncs when SASL is aborted or interrupted pre-registration

2 years agosaslserv/main: Preserve pending login on abort
Ed Kellett [Sun, 17 Oct 2021 17:01:11 +0000 (18:01 +0100)] 
saslserv/main: Preserve pending login on abort

The previous patch made SaslServ aware of pending logins (i.e. SASL
sessions which have succeeded and generated a SVSLOGIN). This one
ensures that aborting a SASL authentication attempt does not destroy
that information: if you successfully authenticate as user A, then begin
and abort another authentication attempt as user B, you will log in as
user A.

This is only relevant in the pre-registration case, when SASL logins
cannot be actioned immediately. It's also necessary to avoid a desync in
this case: if we have already sent a SVSLOGIN for a login, the user is
going to be informed that they've logged in, and the ircd is going treat
them as though they're logged in. Other solutions are possible, but I
think the cleanest one is to action the last SVSLOGIN we sent, mirroring
their effect ircd-side.

2 years agosaslserv/main: Track EID we're pending login to
Ed Kellett [Sun, 17 Oct 2021 13:13:22 +0000 (14:13 +0100)] 
saslserv/main: Track EID we're pending login to

The existing model does not remember that we've sent a SVSLOGIN for a
given SASL session, and simply assumes that if a client is introduced
with a SASL session open, that session must have succeeded. The security
of this approach requires ircd to implicitly abort SASL sessions on
client registration.

This also means that if a client successfully authenticates and then
does something else its pending login is forgotten about, even though a
SVSLOGIN has been sent for it, and the ircd is going to think it's
logged in.

This change removes the dependency on ircd's state machine by keeping
explicit track of the pending login, i.e. the one we've most recently
sent a SVSLOGIN for. The next commit will ensure that a client abort
(even an implicit one) doesn't blow that information away.

2 years agochanserv CLONE/CLEAR AKICKS/CLEAR FLAGS: use CMDLOG_SET
Nicole Kleinhoff [Wed, 29 Sep 2021 05:25:19 +0000 (05:25 +0000)] 
chanserv CLONE/CLEAR AKICKS/CLEAR FLAGS: use CMDLOG_SET

These commands would log at CMDLOG_DO, yet replicating their
functionality via a number of separate FLAGS/AKICK commands would log at
CMDLOG_SET.

Changes to services registrations normally use CMDLOG_SET, so for
consistency, make all of these commands log at that level.

2 years agonickserv/cert CLEAR: use CMDLOG_SET (not _GET)
Nicole Kleinhoff [Wed, 29 Sep 2021 05:14:48 +0000 (05:14 +0000)] 
nickserv/cert CLEAR: use CMDLOG_SET (not _GET)

This appears to be an oversight: the CLEAR command effects a change.
CMGLOG_SET matches the loglevel of ADD/DEL.

2 years agoMerge PR #828
Nicole Kleinhoff [Tue, 28 Sep 2021 23:16:30 +0000 (23:16 +0000)] 
Merge PR #828

2 years agodon't do ircd_on_login in myuser_rename if we're MU_WAITAUTH
jesopo [Tue, 17 Nov 2020 18:28:00 +0000 (18:28 +0000)] 
don't do ircd_on_login in myuser_rename if we're MU_WAITAUTH

2 years agoMerge PR #767 (rehashable general::commit_interval)
Nicole Kleinhoff [Sun, 19 Sep 2021 17:00:36 +0000 (17:00 +0000)] 
Merge PR #767 (rehashable general::commit_interval)

2 years agovisually warn when oper auspex causes you to see last seen time
jesopo [Wed, 15 Sep 2021 19:49:58 +0000 (19:49 +0000)] 
visually warn when oper auspex causes you to see last seen time

2 years agoatheme_main: rehash if necessary after DB load
Doug Freed [Fri, 3 Sep 2021 21:53:14 +0000 (17:53 -0400)] 
atheme_main: rehash if necessary after DB load

Avoids an issue where a DB module dependency loads a service which then
doesn't get configured properly.

2 years agolibathemecore/email: sendemail: don't leak pipe fds on fork failure
Aaron Jones [Tue, 17 Aug 2021 02:13:47 +0000 (02:13 +0000)] 
libathemecore/email: sendemail: don't leak pipe fds on fork failure

2 years agolibathemecore/: move e-mail functions to their own compilation unit
Aaron Jones [Tue, 17 Aug 2021 02:05:18 +0000 (02:05 +0000)] 
libathemecore/: move e-mail functions to their own compilation unit

2 years agolibathemecore/connection: remove obsolete connection_close_all_fds()
Aaron Jones [Sat, 7 Aug 2021 18:45:47 +0000 (18:45 +0000)] 
libathemecore/connection: remove obsolete connection_close_all_fds()

2 years agolibathemecore/connection: connection_add(): make fd non-inheritable
Aaron Jones [Sat, 7 Aug 2021 18:36:00 +0000 (18:36 +0000)] 
libathemecore/connection: connection_add(): make fd non-inheritable

Grumble; Windows compatibility stuff, ew, etc. I just copied the
function below it. Windows compatibility is liable to get ripped
out of services entirely due to WSL being A Thing now, but for
now just follow the convention.

This means we now don't need to call connection_close_all_fds()
when forking to send e-mail.

2 years agolibathemecore/random_fe_internal: don't leak urandom(4) fd to children
Aaron Jones [Sat, 7 Aug 2021 18:10:00 +0000 (18:10 +0000)] 
libathemecore/random_fe_internal: don't leak urandom(4) fd to children

2 years agoMerge pull request #814 from swantzter/patch-1
alyx [Tue, 3 Aug 2021 08:04:59 +0000 (03:04 -0500)] 
Merge pull request #814 from swantzter/patch-1

Bolden oper name in fungroup wallop

2 years agoBolden oper name in fungroup wallop
Svante Bengtson [Tue, 3 Aug 2021 08:03:03 +0000 (10:03 +0200)] 
Bolden oper name in fungroup wallop

this brings consistency with the wallop from FDROP per modules/nickserv/drop.c L157

2 years agoMerge pull request #813 from ProgVal/insp3
alyx [Thu, 29 Jul 2021 19:36:08 +0000 (14:36 -0500)] 
Merge pull request #813 from ProgVal/insp3

Document Insp 3 support

2 years agoDocument Insp 3 support
Valentin Lorentz [Thu, 29 Jul 2021 18:08:29 +0000 (20:08 +0200)] 
Document Insp 3 support

2 years agolibathemecore/atheme.c: abort if uplink name clashes with ours
Aaron Jones [Sun, 18 Jul 2021 16:07:11 +0000 (16:07 +0000)] 
libathemecore/atheme.c: abort if uplink name clashes with ours

2 years agolibathemecore/conf.c: ignore invalid uplink blocks
Aaron Jones [Sun, 18 Jul 2021 16:04:31 +0000 (16:04 +0000)] 
libathemecore/conf.c: ignore invalid uplink blocks

2 years agolibathemecore/uplink.c: increase severity of duplicate log message
Aaron Jones [Sun, 18 Jul 2021 16:02:29 +0000 (16:02 +0000)] 
libathemecore/uplink.c: increase severity of duplicate log message

2 years agolibathemecore/uplink.c: ensure uplink list is zero-initialised
Aaron Jones [Sun, 18 Jul 2021 16:01:05 +0000 (16:01 +0000)] 
libathemecore/uplink.c: ensure uplink list is zero-initialised

2 years agomodules/saslserv/main: simplify impersonation logic
Aaron Jones [Fri, 16 Jul 2021 15:35:47 +0000 (15:35 +0000)] 
modules/saslserv/main: simplify impersonation logic

Now that there's only one condition to check for, and the target
function checks the same condition anyway, just remove the
redundant check.

2 years agomodules/saslserv/main: authxid_can_login: check for freeze early
Aaron Jones [Fri, 16 Jul 2021 15:31:21 +0000 (15:31 +0000)] 
modules/saslserv/main: authxid_can_login: check for freeze early

Freezing an account should prevent a login attempt entirely, rather
than allowing the mechanism to succeed first, only for the login
itself to then fail.

2 years agonickserv/register, contrib/ns_{fregister,forbid}: check name validity
Aaron Jones [Sun, 11 Jul 2021 10:54:02 +0000 (10:54 +0000)] 
nickserv/register, contrib/ns_{fregister,forbid}: check name validity

Reported-By: @dwfreed
2 years agolibathemecore/phandler.c: is_valid_nick: check nickname length too
Aaron Jones [Sun, 11 Jul 2021 10:53:07 +0000 (10:53 +0000)] 
libathemecore/phandler.c: is_valid_nick: check nickname length too

Also document more thoroughly why nicknames cannot begin with a digit
or a hyphen.

2 years agolibathemecore/function.c: sendemail_urlencode: cast argument to isalnum(3)
Aaron Jones [Sat, 10 Jul 2021 21:05:44 +0000 (21:05 +0000)] 
libathemecore/function.c: sendemail_urlencode: cast argument to isalnum(3)

This may avoid diagnostics on systems with signed chars. Not actually a
problem in practice because we do not consider such characters to be
valid in a nickname, which is required for them to be valid account
names.

cf. https://github.com/atheme/atheme/commit/fcc4e19a573001263245#r53314237

2 years agolibathemecore/function.c: sendemail(): allow for urlencoding account
Aaron Jones [Sat, 10 Jul 2021 18:07:47 +0000 (18:07 +0000)] 
libathemecore/function.c: sendemail(): allow for urlencoding account

If one wishes to replace their register email template to prefix the account
name and registration verification token with a URL (to implement a webserver
to verify registrations, so people don't have to copy and paste commands to
execute on IRC), we should allow for the possibility that people will have
non-alphanumeric characters in their account name, and provide a URL-encoded
version of it.

This will ensure that such links are always clickable in various MUAs.

2 years agoMerge pull request #793 from ProgVal/patch-1
alyx [Mon, 5 Jul 2021 20:58:14 +0000 (15:58 -0500)] 
Merge pull request #793 from ProgVal/patch-1

INSTALL: Remove unnessarily agressive remark

2 years agoMerge pull request #794 from ProgVal/patch-2
alyx [Mon, 5 Jul 2021 20:57:07 +0000 (15:57 -0500)] 
Merge pull request #794 from ProgVal/patch-2

Explain configuration outside the "Compiling" section

2 years agoMerge pull request #803 from ValwareIRC/master
Aaron Jones [Sun, 4 Jul 2021 19:36:08 +0000 (19:36 +0000)] 
Merge pull request #803 from ValwareIRC/master

gib de topic reject reason more verbose explanation

2 years agoMerge pull request #807 from spb/hs-take-single
Aaron Jones [Sun, 4 Jul 2021 19:04:30 +0000 (19:04 +0000)] 
Merge pull request #807 from spb/hs-take-single

Allow HS TAKE without params if there's only one HS OFFER (#2)

2 years agoMerge pull request #790 from edk0/confirm-by-emailchg
Aaron Jones [Sat, 3 Jul 2021 16:22:32 +0000 (16:22 +0000)] 
Merge pull request #790 from edk0/confirm-by-emailchg

Make VERIFY EMAILCHG confirm the account if necessary

2 years agostrncpy->mowgli_strlcpy, fix buffer size
Stephen Bennett [Sat, 3 Jul 2021 15:34:52 +0000 (16:34 +0100)] 
strncpy->mowgli_strlcpy, fix buffer size

2 years agoAllow services-generated passwords length to be dynamically configured
Aaron Jones [Sat, 3 Jul 2021 14:15:25 +0000 (14:15 +0000)] 
Allow services-generated passwords length to be dynamically configured

Closes #800

2 years agoMake a local copy before modifying the host string, as we might be using the copy...
Stephen Bennett [Fri, 2 Jul 2021 19:57:56 +0000 (20:57 +0100)] 
Make a local copy before modifying the host string, as we might be using the copy from the offer db instead of a command parameter

2 years agoAllow HS TAKE without params if there's only one HS OFFER
Stephen Bennett [Fri, 2 Jul 2021 19:34:14 +0000 (20:34 +0100)] 
Allow HS TAKE without params if there's only one HS OFFER

2 years agoUpdate modules/chanserv/topic.c
Valerie Pond [Mon, 28 Jun 2021 09:00:29 +0000 (10:00 +0100)] 
Update modules/chanserv/topic.c

Please change color to colour to match the rest of the language as it uses British English.

Co-authored-by: Data <redacted>
2 years agoupdate a bit more ♥♥
ValwareIRC [Mon, 28 Jun 2021 08:45:05 +0000 (09:45 +0100)] 
update a bit more ♥♥

2 years agoUpdate function.c
ValwareIRC [Mon, 28 Jun 2021 08:14:21 +0000 (09:14 +0100)] 
Update function.c

2 years agoGive correct information when declining a topic because of control chars.
ValwareIRC [Mon, 28 Jun 2021 07:37:41 +0000 (08:37 +0100)] 
Give correct information when declining a topic because of control chars.

2 years agoExplain configuration outside the "Compiling" section
Val Lorentz [Sat, 26 Jun 2021 17:51:59 +0000 (19:51 +0200)] 
Explain configuration outside the "Compiling" section

It didn't really make sense as configuration isn't part of the compilation.

Additionally, not everyone installs Atheme by compiling it themselves,
or they may not have the file at hand while reading this document
(eg. reading the documentation before actually doing it)

2 years agoINSTALL: Remove unnessarily agressive remark
Val Lorentz [Sat, 26 Jun 2021 17:07:45 +0000 (19:07 +0200)] 
INSTALL: Remove unnessarily agressive remark

People who set up their first IRC network will read this documentation,
it seems unnecessary to shame them for... not knowing how to setup
and IRC network.

2 years agoMerge pull request #792 from mquin/patch-1
Aaron Jones [Thu, 24 Jun 2021 13:02:18 +0000 (13:02 +0000)] 
Merge pull request #792 from mquin/patch-1

Remove reference to SET FOUNDER in help for DROP

2 years agoRemove reference to SET FOUNDER in help for DROP
Mike Quin [Thu, 24 Jun 2021 10:35:15 +0000 (11:35 +0100)] 
Remove reference to SET FOUNDER in help for DROP

2 years ago.gitattributes: remove files that no longer exist
Aaron Jones [Thu, 24 Jun 2021 09:46:09 +0000 (09:46 +0000)] 
.gitattributes: remove files that no longer exist

2 years agoemail/default/setpass: don't encourage contact for unsolicited receipt
Aaron Jones [Thu, 24 Jun 2021 09:39:27 +0000 (09:39 +0000)] 
email/default/setpass: don't encourage contact for unsolicited receipt

Nothing can be done to the account without the token in this e-mail,
and any competent malicious actor who does have unauthorised access to
a user's e-mail inbox is also just going to delete the e-mail after
compromising the user's account anyway.

Therefore, it doesn't make sense to encourage the user to reach out to
the network administration.

Also clarify that password reset tokens are now automatically
invalidated by a successful login.

2 years agolibathemecore/services.c: myuser_login(): invalidate password change tokens
Aaron Jones [Thu, 24 Jun 2021 09:38:14 +0000 (09:38 +0000)] 
libathemecore/services.c: myuser_login(): invalidate password change tokens

2 years agolibathemecore/ptasks.c: handle_kill(): don't use slog() if we got killed
Aaron Jones [Sun, 20 Jun 2021 02:32:27 +0000 (02:32 +0000)] 
libathemecore/ptasks.c: handle_kill(): don't use slog() if we got killed

If a client on our server is killed, we cannot reliably use slog(),
because the client may be OperServ, and slog() mesages are sent from
OperServ.

It turns out that some IRCds care about receiving messages from UIDs
it doesn't know about (because it just killed them), and will send
KILLs for them over and over again.

Reported-By: @A-UNDERSCORE-D
2 years agomodules/protocol/unreal4: correct module name
Aaron Jones [Sat, 19 Jun 2021 22:46:22 +0000 (22:46 +0000)] 
modules/protocol/unreal4: correct module name

2 years agoLog correct target name for verifies
Ed Kellett [Sat, 19 Jun 2021 14:39:04 +0000 (15:39 +0100)] 
Log correct target name for verifies

2 years agoVERIFY EMAILCHG confirms account too
Ed Kellett [Sat, 19 Jun 2021 14:38:57 +0000 (15:38 +0100)] 
VERIFY EMAILCHG confirms account too

2 years agom4/atheme-libtest-*.m4: correct copy/paste mistake on temporary variable name
Aaron Jones [Fri, 18 Jun 2021 17:27:32 +0000 (17:27 +0000)] 
m4/atheme-libtest-*.m4: correct copy/paste mistake on temporary variable name

2 years agoMerge pull request #786 from atheme/fix/module_unload
Aaron Jones [Sun, 13 Jun 2021 08:18:22 +0000 (08:18 +0000)] 
Merge pull request #786 from atheme/fix/module_unload

Module unloading use-after-free fixes

2 years agomodules/operserv/modmanager: account for an entire list of non-reloadables
Aaron Jones [Sun, 13 Jun 2021 07:59:31 +0000 (07:59 +0000)] 
modules/operserv/modmanager: account for an entire list of non-reloadables

When recursing a given module's reverse dependencies, it is
possible that we run into a permanent module that is depended
upon by a semi-permanent (reload-only) module. This will result
in the reload of that module being skipped (as there is a
permanent module in its reverse dependency chain), but the
mod_recurse_revdeps() function will still set the r_dep pointer
to the semi-permanent one.

We then test if r_dep is set to perform a database save (in case
reloading of the reload-only module fails). However, if our
entire list of modules to reload has recursive non-reloadability
status, we will be saving the database for nothing, as we then
go on to ignore every module in the list.

Exit early if this is the case, avoiding a pointless wallops and
database save.

2 years agooperserv/modmanager: MODRELOAD: avoid potential use-after-free
Nicole Kleinhoff [Thu, 3 Jun 2021 06:46:56 +0000 (06:46 +0000)] 
operserv/modmanager: MODRELOAD: avoid potential use-after-free

Listing the same module twice in the list of MODRELOAD parameters, or
listing a module that would already be unloaded for depending on a
module given earlier in the list, would attempt to unload a module that
had already been unloaded.

Instead of storing the module pointer when initially processing the
list, we now call module_find_published() again just before unloading
the module. (We do remember the unload capability value computed during
the initial processing to avoid having to recurse again.)

2 years agomodule_unload: avoid potential use-after-free
Nicole Kleinhoff [Thu, 3 Jun 2021 05:58:04 +0000 (05:58 +0000)] 
module_unload: avoid potential use-after-free

Given three modules (A, B, C), where:

B depends on A
C depends on B
C depends on A

Module A can end up with this reverse dependency graph (as represented
in the modules' required_by lists):

A -> B -> C
A -> C

Given B is listed first in required_by, it will be unloaded;
recursively, C will be unloaded. However, unloading a module also
removes it from its dependencies' required_by lists, thus removing C
from A's required_by list. While the _SAFE variant of the list iteration
macro is designed to handle the current element being removed, it is not
able to handle an arbitrary number of following elements being removed
as well.

As unloading a module will always remove it from the required_by list,
we can instead keep unloading the first element of the list until the
list is empty.

2 years agoUpdate loginnolimit.c
alyx [Fri, 11 Jun 2021 18:38:21 +0000 (13:38 -0500)] 
Update loginnolimit.c

Fixes #789

2 years agoUpdate my e-mail address
Aaron Jones [Tue, 8 Jun 2021 04:41:25 +0000 (04:41 +0000)] 
Update my e-mail address

2 years agomodules/saslserv/main.c: rename flag for secure client connection
Aaron Jones [Fri, 4 Jun 2021 22:57:45 +0000 (23:57 +0100)] 
modules/saslserv/main.c: rename flag for secure client connection

Hooks should be able to judge whether to allow an SASL negotiation
based on whether the client is connected to the network securely or
not; not just whether it is using TLS. Some IRCds have the concept
of "secure origins", and can treat e.g. connections from localhost
as secure against eavesdropping. Rename the flag appropriately.

2 years agoMerge pull request #782 from atheme/amdj/stats-t-unpriv
Aaron Jones [Wed, 2 Jun 2021 21:47:16 +0000 (21:47 +0000)] 
Merge pull request #782 from atheme/amdj/stats-t-unpriv

libathemecore/ptasks.c: STATS:T: make nonsensitive data available

2 years agolibathemecore/ptasks.c: STATS:T: make nonsensitive data available
Aaron Jones [Sat, 29 May 2021 21:12:23 +0000 (21:12 +0000)] 
libathemecore/ptasks.c: STATS:T: make nonsensitive data available

The statistics for server, user, and chan can already be obtained via
the LUSERS command on IRC, so it does not make sense for services to
prevent accessing these by requiring services privileges.

Furthermore, the number of registered accounts, nicknames, and channels
should also not be considered sensitive data. The Atheme project does
not condone hiding such basic and non-sensitive data from network users.

Finally, put missing mynicks count in default MOTD file.

2 years agomodules/chanserv/access: re-arrange empty check order
Aaron Jones [Sun, 30 May 2021 15:34:57 +0000 (15:34 +0000)] 
modules/chanserv/access: re-arrange empty check order

Discovered while I was about to merge #784. Didn't want to trip CI again
twice with the fix and merge, so I'll merge and fix it in one shot. The
rest of the pull request establishes the check order as permissions,
closure, and then emptiness.

2 years agoMerge pull request #784 from phy1729/chanserv-ensure-not-closed
Aaron Jones [Sun, 30 May 2021 15:38:09 +0000 (15:38 +0000)] 
Merge pull request #784 from phy1729/chanserv-ensure-not-closed

2 years agochanserv/{clear,clone}: Use STR_CHANNEL_IS_EMPTY
Matthew Martin [Sun, 30 May 2021 15:11:48 +0000 (10:11 -0500)] 
chanserv/{clear,clone}: Use STR_CHANNEL_IS_EMPTY

2 years agochanserv/{akick,clear,clone,getkey,info,invite,recover,sync,topic,unban,xop}: Sort...
Matthew Martin [Sun, 30 May 2021 14:46:31 +0000 (09:46 -0500)] 
chanserv/{akick,clear,clone,getkey,info,invite,recover,sync,topic,unban,xop}: Sort checks

Checks go in the order access, closure, empty (if needed).

2 years agochanserv/{ban,kick,quiet,set,sync,taxonomy,unban}: Ensure channel is not closed
Matthew Martin [Sun, 30 May 2021 03:19:14 +0000 (22:19 -0500)] 
chanserv/{ban,kick,quiet,set,sync,taxonomy,unban}: Ensure channel is not closed

2 years agoMerge pull request #780 from mquin/mquin-ns-help-examples
Aaron Jones [Sat, 29 May 2021 18:53:01 +0000 (18:53 +0000)] 
Merge pull request #780 from mquin/mquin-ns-help-examples

Add examples to NickServ help entries.

2 years agomodules/nickserv/set_accountname: log when hook denies account name change
Aaron Jones [Sat, 29 May 2021 18:50:56 +0000 (18:50 +0000)] 
modules/nickserv/set_accountname: log when hook denies account name change