diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-05 11:06:05 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-06 11:26:06 +0100 |
commit | bc1b958ceb9198fea232d9aa261ad7eeb5c9be06 (patch) | |
tree | 325cfcaed4cbc45dc3080efb402d8ce1e1d35e12 /sources/ogAdmServer.cpp | |
parent | 0a41d5d02f703a051a0a79d4f7bfa3db4caee77c (diff) |
#915 Validate POST /stop REST API parameters
This patch ensures that all required parameters are sent in the request.
Diffstat (limited to 'sources/ogAdmServer.cpp')
-rw-r--r-- | sources/ogAdmServer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |