inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 0b66cad1b04c104f3afb75cafd23faf4cb527a49
parent 94ce90c588b7d919102a91d3e0f6df4188ae417b
Author: Peter Powell <petpow@saberuk.com>
Date:   Mon, 25 Mar 2019 13:23:50 +0000

m_permchannels: validate channel names properly.

Diffstat:
Msrc/modules/m_permchannels.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp @@ -193,9 +193,9 @@ public: std::string channel = tag->getString("channel"); std::string modes = tag->getString("modes"); - if ((channel.empty()) || (channel.length() > ServerInstance->Config->Limits.ChanMax)) + if (!ServerInstance->IsChannel(channel)) { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with empty or too long channel name (\"" + channel + "\")"); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")"); continue; }