From bc1b958ceb9198fea232d9aa261ad7eeb5c9be06 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Tue, 5 Nov 2019 11:06:05 +0100 Subject: #915 Validate POST /stop REST API parameters This patch ensures that all required parameters are sent in the request. --- sources/ogAdmServer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 3770ec9..3576f7f 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -3928,6 +3928,9 @@ static int og_cmd_stop(json_t *element, struct og_msg_params *params) break; } + if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR)) + return -1; + return og_cmd_legacy_send(params, "Purgar", CLIENTE_APAGADO); } -- cgit v1.2.3-18-g5258