From b0f3c8ba56b228ef90ca3827fa681ac4afffff9b Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 5 Aug 2008 14:30:54 +0000 Subject: Fix banredirect modifying extban masks, patch based on one provided by jackmcbarn, except with length checking to avoid explosions on certain STL implementations git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10093 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_banredirect.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index ffb263ff7..80beaa450 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -62,6 +62,9 @@ class BanRedirect : public ModeWatcher std::string::iterator start_pos = param.begin(); long maxbans = channel->GetMaxBans(); + if (param.length() >= 2 && param[1] == ':') + return true; + if(adding && (channel->bans.size() > static_cast(maxbans))) { source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick.c_str(), channel->name.c_str(), channel->name.c_str(), maxbans); -- cgit v1.2.3