diff options
| author | Adam <adam@sigterm.info> | 2016-02-11 07:03:55 -0600 |
|---|---|---|
| committer | Adam <adam@sigterm.info> | 2016-02-11 07:03:55 -0600 |
| commit | 4071487f803f3f38f0ec993c90ffe4d57edcd798 (patch) | |
| tree | f040ecd99221482d3dece45c8b6ac07f64127918 /modules/protocol | |
| parent | dd9fcca45d0e333f2727112f8cee26f7bd873cd9 (diff) | |
| parent | 9c17c2d818a363321e61689b4eb932034969bb99 (diff) | |
Merge pull request #154 from SaberUK/2.0+inspfix
Fix a low risk privilege escalation exploit on InspIRCd with m_autoop.
Diffstat (limited to 'modules/protocol')
| -rw-r--r-- | modules/protocol/inspircd20.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 677014685..c54cfe184 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -77,6 +77,21 @@ class InspIRCd20Proto : public IRCDProto bool IsIdentValid(const Anope::string &ident) anope_override { return insp12->IsIdentValid(ident); } }; +class InspIRCdAutoOpMode : public ChannelModeList +{ + public: + InspIRCdAutoOpMode(char mode) : ChannelModeList("AUTOOP", mode) + { + } + + bool IsValid(Anope::string &mask) const anope_override + { + // We can not validate this because we don't know about the + // privileges of the setter so just reject attempts to set it. + return false; + } +}; + class InspIRCdExtBan : public ChannelModeVirtual<ChannelModeList> { char ext; @@ -395,6 +410,8 @@ struct IRCDMessageCapab : Message::Capab } else if (modename.equals_cs("auditorium")) cm = new ChannelMode("AUDITORIUM", modechar[0]); + else if (modename.equals_cs("autoop")) + cm = new InspIRCdAutoOpMode(modechar[0]); else if (modename.equals_cs("ban")) cm = new ChannelModeList("BAN", modechar[0]); else if (modename.equals_cs("banexception")) |
