]> jfr.im git - irc/atheme/atheme.git/commitdiff
nickserv/register, contrib/ns_{fregister,forbid}: check name validity
authorAaron Jones <redacted>
Sun, 11 Jul 2021 10:54:02 +0000 (10:54 +0000)
committerAaron Jones <redacted>
Sun, 11 Jul 2021 11:29:44 +0000 (11:29 +0000)
Reported-By: @dwfreed
modules/contrib
modules/nickserv/register.c

index be9384dd7ba216e52b8094100c1d2063f9fee18b..8f7fee4a0acc45925f3b432b50833b9dc35004dd 160000 (submodule)
@@ -1 +1 @@
-Subproject commit be9384dd7ba216e52b8094100c1d2063f9fee18b
+Subproject commit 8f7fee4a0acc45925f3b432b50833b9dc35004dd
index b449ec49a62f0d65395cf749fc674e450070592e..77862f716d57335e2c3b0a0734ae1e3e5ffdd160 100644 (file)
@@ -77,16 +77,7 @@ ns_cmd_register(struct sourceinfo *si, int parc, char *parv[])
                return;
        }
 
-       if (nicksvs.no_nick_ownership || si->su == NULL)
-       {
-               if (strchr(account, ' ') || strchr(account, '\n') || strchr(account, '\r') || account[0] == '=' || account[0] == '#' || account[0] == '@' || account[0] == '+' || account[0] == '%' || account[0] == '!' || strchr(account, ','))
-               {
-                       command_fail(si, fault_badparams, _("The account name \2%s\2 is invalid."), account);
-                       return;
-               }
-       }
-
-       if (strlen(account) > NICKLEN)
+       if (! is_valid_nick(account))
        {
                command_fail(si, fault_badparams, _("The account name \2%s\2 is invalid."), account);
                return;