From 675698fff9da3b409386b17f18a3d8a7dfe15568 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 19 Feb 2006 11:27:00 +0000 Subject: - 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 --- src/modules/m_redirect.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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 */ -- cgit v1.2.3