Skip to content

Commit

Permalink
modules/nickserv/multimark: MARK ADD: check operator is logged in
Browse files Browse the repository at this point in the history
The ADD subcommand takes a copy of the operator's account name and
entity ID for future LIST output.

Ensure that the operator is actually logged into a services account
before attempting to do this, or we will crash.

It is only possible to trigger this crash by giving MARK privileges
to the "ircop" operclass, being opered, and not being logged in
while executing MARK ADD.

Reported-By: TheDaemoness <she@daemoness.dev>
  • Loading branch information
aaronmdjones committed Mar 21, 2024
1 parent 9d23473 commit 3c9ce6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/nickserv/multimark.c
Expand Up @@ -784,6 +784,12 @@ ns_cmd_multimark(struct sourceinfo *si, int parc, char *parv[])
return;
}

if (! si->smu)
{
command_fail(si, fault_noprivs, STR_NOT_LOGGED_IN);
return;
}

l = multimark_list(mu);

mm = smalloc(sizeof *mm);
Expand Down

0 comments on commit 3c9ce6a

Please sign in to comment.