diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2012-09-14 20:20:47 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2012-09-18 19:50:07 +0400 |
commit | 145d9f96f5232a156318563a8659a2db182277a1 (patch) | |
tree | 50485a69f102feb8bc396fcd2dffb18a696598ab /src/murmur/MurmurIce.cpp | |
parent | 98cacbc28fa98e36eb6eba60b3cf40c36d76a05c (diff) |
Introduce channel nesting limit (default=10).
Add NestingLimitException to Ice Interface and introduce a new NestingLimit PermissionDenied type.
Addresses #3566322 "ServerDB::deleteServer crashes master"
Diffstat (limited to 'src/murmur/MurmurIce.cpp')
-rw-r--r-- | src/murmur/MurmurIce.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/murmur/MurmurIce.cpp b/src/murmur/MurmurIce.cpp index a9f1bd840..18534ed5f 100644 --- a/src/murmur/MurmurIce.cpp +++ b/src/murmur/MurmurIce.cpp @@ -1237,6 +1237,11 @@ static void impl_Server_setChannelState(const ::Murmur::AMD_Server_setChannelSta newset << cLink; } + if (!server->canNest(np, channel)) { + cb->ice_exception(::Murmur::NestingLimitException()); + return; + } + if (! server->setChannelState(channel, np, qsName, newset, u8(state.description), state.position)) cb->ice_exception(::Murmur::InvalidChannelException()); else @@ -1260,6 +1265,11 @@ static void impl_Server_addChannel(const ::Murmur::AMD_Server_addChannelPtr cb, ::Channel *p, *nc; NEED_CHANNEL_VAR(p, parent); + if (!server->canNest(p)) { + cb->ice_exception(::Murmur::NestingLimitException()); + return; + } + QString qsName = u8(name); nc = server->addChannel(p, qsName); |