From 830361e97d03c74e54cb1cf1bbf329dffdeb66f7 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 24 Sep 2015 17:22:44 -0400 Subject: [PATCH] Check privilege name is valid in SetLevel --- src/regchannel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/regchannel.cpp b/src/regchannel.cpp index ebc542547..b7c353554 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -576,6 +576,12 @@ int16_t ChannelInfo::GetLevel(const Anope::string &priv) const void ChannelInfo::SetLevel(const Anope::string &priv, int16_t level) { + if (PrivilegeManager::FindPrivilege(priv) == NULL) + { + Log(LOG_DEBUG) << "Unknown privilege " + priv; + return; + } + this->levels[priv] = level; }