diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-05 11:31:24 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-06 11:26:33 +0100 |
commit | 7803e13adf1f7bab6c1004a659942a55d1ee085c (patch) | |
tree | 4984428030d36f9edb718109189508f48783de64 /sources | |
parent | 93028bd055b46a117ede58f85e74cc3b3f9a6a32 (diff) |
#915 Validate POST /hardware REST API parameters
This patch ensures that all required parameters are sent in the request.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/ogAdmServer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index dc6aa12..db95298 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -3954,6 +3954,9 @@ static int og_cmd_hardware(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, "InventarioHardware", CLIENTE_OCUPADO); } |