From 22469c65863da7a0b97c48fe82cf9701b3e83ebd Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Tue, 5 Nov 2019 10:44:01 +0100 Subject: #915 Validate POST /shell/output REST API parameters This patch ensures that all required parameters are sent in the request. --- admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'admin') diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp index fb843557..5d17480c 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp @@ -3729,6 +3729,9 @@ static int og_cmd_run_get(json_t *element, struct og_msg_params *params, return err; } + if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR)) + return -1; + array = json_array(); if (!array) return -1; -- cgit v1.2.3-18-g5258