diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/core/ns_forbid.c | 16 | ||||
-rw-r--r-- | version.log | 3 |
3 files changed, 19 insertions, 1 deletions
@@ -1,6 +1,7 @@ Anope Version 1.8 - GIT ----------------------- 01/29 F Fixed user modes on BotServ bots on Unreal3.2.10 [#1474] +02/13 F Do not allow invalid nicknames to be forbidden in ns_forbid [ #00] Provided by Anope Dev. <team@anope.org> - 2012 02/22 F Fixed several grammar errors in docs/ (patch provided by Simba) [ #00] diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c index 094c819c4..28bff3f55 100644 --- a/src/core/ns_forbid.c +++ b/src/core/ns_forbid.c @@ -73,6 +73,7 @@ static int do_forbid(User * u) NickAlias *na; char *nick = strtok(NULL, " "); char *reason = strtok(NULL, ""); + char *ch; /* Assumes that permission checking has already been done. */ if (!nick || (ForceForbidReason && !reason)) { @@ -88,6 +89,21 @@ static int do_forbid(User * u) notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, nick); return MOD_CONT; } + + if (isdigit(nick[0]) || nick[0] == '-' || strlen(nick) > NICKMAX - 1) + { + notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, nick); + return MOD_CONT; + } + for (ch = nick; *ch; ch++) + { + if (!isvalidnick(*ch)) + { + notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, nick); + return MOD_CONT; + } + } + if ((na = findnick(nick)) != NULL) { if (NSSecureAdmins && nick_is_services_admin(na->nc) && !is_services_root(u)) { diff --git a/version.log b/version.log index b3d6c8640..7edb614d1 100644 --- a/version.log +++ b/version.log @@ -8,9 +8,10 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="8" VERSION_EXTRA="-git" -VERSION_BUILD="3108" +VERSION_BUILD="3109" # Changes since 1.8.7 Release +#Revision 3109 - Do not allow invalid nicknames to be forbidden in ns_forbid #Revision 3108 - Bug #1474 - Fixed setting umodes on BotServ bots on Unreal3.2.10 #Revision 3106 - Replaced experimental Hybrid 7.0 support by Hybrid 8.0 support. (Patch provided by Hybrid Development Team) #Revision 3105 - Added french language support to some modules (patch provided by Coolsmile) |