diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-06 13:38:03 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-12 21:37:11 +0100 |
commit | 3aac64e42e5aeafa45b58866d7a5612396199a72 (patch) | |
tree | 5989e01eb7616cfa56d0757fa491a84deca81507 | |
parent | 64aef4d001923ec19f3fa0e93e025b7f771c160f (diff) |
#915 Validate POST /run/schedule REST API parameters
This patch ensures that all required parameters are sent in the request.
-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 f63eda4c..552ef2b0 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp @@ -4280,6 +4280,9 @@ static int og_cmd_run_schedule(json_t *element, struct og_msg_params *params) break; } + if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR)) + return -1; + og_cmd_legacy_send(params, "EjecutaComandosPendientes", CLIENTE_OCUPADO); return 0; |