Skip to content

Commit

Permalink
nickserv: Verify that the nick being regained is valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
Colgate Minuette authored and Colgate Minuette committed Oct 3, 2015
1 parent d303789 commit 155f79c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/nickserv/enforce.c
Expand Up @@ -331,6 +331,12 @@ static void ns_cmd_regain(sourceinfo_t *si, int parc, char *parv[])
logcommand(si, CMDLOG_DO, "failed REGAIN \2%s\2 (password authentication disabled)", target);
return;
}
if (!is_valid_nick(target))
{
command_fail(si, fault_badparams, "\2%s\2 is not a valid nick.", target);
logcommand(si, CMDLOG_DO, "failed REGAIN \2%s\2 (not a valid nickname)", target);
return;
}
if ((si->smu == mn->owner) || verify_password(mn->owner, password))
{
if (si->su != NULL && (user_is_channel_banned(si->su, 'b') || user_is_channel_banned(si->su, 'q')))
Expand Down

0 comments on commit 155f79c

Please sign in to comment.