Try to fix channel limit override by subchan delete

Try to remove the ability to join a full channel by
creating a temporary sub channel then joining it
and removing it (discovered by @Natenom).

Check isChannelFull in addition to existing
hasPermissions ChanACL::Enter check.
This commit is contained in:
Felix Becker 2019-11-03 23:37:35 +01:00
parent ccdb88f872
commit 2faf905167

View File

@ -1626,7 +1626,7 @@ void Server::removeChannel(Channel *chan, Channel *dest) {
}
Channel *target = dest;
while (target->cParent && ! hasPermission(static_cast<ServerUser *>(p), target, ChanACL::Enter))
while (target->cParent && (! hasPermission(static_cast<ServerUser *>(p), target, ChanACL::Enter) || isChannelFull(target, static_cast<ServerUser *>(p))))
target = target->cParent;
MumbleProto::UserState mpus;