diff options
Diffstat (limited to 'responsememblk.c')
-rwxr-xr-x | responsememblk.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/responsememblk.c b/responsememblk.c index f77f950..292dabb 100755 --- a/responsememblk.c +++ b/responsememblk.c @@ -1172,7 +1172,6 @@ void cResponseMemBlk::sendRecCmds() { void cResponseMemBlk::receiveExecRecCmdReq() { vector<sQueryAVP> avps; - mRequest->parseQueryLine(&avps); string guid; string cmd_str; uint cmdid; @@ -1180,6 +1179,14 @@ void cResponseMemBlk::receiveExecRecCmdReq() { if (isHeadRequest()) return; + if (! mRequest->mFactory->getConfig()->getRecCmds()) { + sendError(400, "Bad Request", NULL, "017 execreccmd disabled."); + return; + + } + mRequest->parseQueryLine(&avps); + + if (mRequest->getQueryAttributeValue(&avps, "guid", guid) != OKAY){ sendError(400, "Bad Request", NULL, "002 No guid in query line"); return; |