From: w00t Date: Sun, 19 Feb 2006 11:27:00 +0000 (+0000) Subject: - Don't allow invalid channel names in /mode #chan +L #chan X-Git-Tag: v2.0.23~8850 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=675698fff9da3b409386b17f18a3d8a7dfe15568;p=user%2Fhenk%2Fcode%2Finspircd.git - Don't allow invalid channel names in /mode #chan +L #chan git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3238 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index a7115a15e..a91ddef7f 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -45,7 +45,15 @@ class ModuleRedirect : public Module if (mode_on) { std::string ChanToJoin = params[0]; - chanrec* c = Srv->FindChannel(ChanToJoin); + chanrec *c; + + if (!IsValidChannelName(ChanToJoin.c_str())) + { + WriteServ(user->fd,"403 %s %s :Invalid channel name",user->nick, ChanToJoin.c_str()); + return 0; + } + + c = Srv->FindChannel(ChanToJoin); if (c) { /* Fix by brain: Dont let a channel be linked to *itself* either */