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 | 04a8c17d711fbd7cd1e2761b1b15cee4afc7cbb2 (patch) | |
tree | 7952e7d72bd59d887ae9017f6c81ebf26012a56b /admin | |
parent | d86ddce3f5b16436849a764f6fc854b8fe37dccf (diff) |
#915 Validate POST /stop REST API parameters
This patch ensures that all required parameters are sent in the request.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp index 3770ec95..3576f7ff 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp +++ b/admin/Sources/Services/ogAdmServer/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); } |