summaryrefslogtreecommitdiffstats
path: root/admin/Sources/Services
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-11-05 10:44:01 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-11-06 11:22:35 +0100
commit22469c65863da7a0b97c48fe82cf9701b3e83ebd (patch)
tree579f277f17b72e982ac388e1dd84a3a8aafe92c9 /admin/Sources/Services
parent3debec6024f106d54a880a1aafbb891383bb4f09 (diff)
#915 Validate POST /shell/output REST API parameters
This patch ensures that all required parameters are sent in the request.
Diffstat (limited to 'admin/Sources/Services')
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp3
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 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;