From 6066b3260326e259bba3a2463d1f50aba16d0906 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Wed, 6 Nov 2019 13:38:03 +0100 Subject: #915 Validate POST /run/schedule REST API parameters This patch ensures that all required parameters are sent in the request. --- sources/ogAdmServer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sources') diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index f63eda4..552ef2b 100644 --- a/sources/ogAdmServer.cpp +++ b/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; -- cgit v1.2.3-18-g5258