summaryrefslogtreecommitdiffstats
path: root/sources/ogAdmServer.cpp
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-11-05 11:31:24 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-11-06 11:26:33 +0100
commit7803e13adf1f7bab6c1004a659942a55d1ee085c (patch)
tree4984428030d36f9edb718109189508f48783de64 /sources/ogAdmServer.cpp
parent93028bd055b46a117ede58f85e74cc3b3f9a6a32 (diff)
#915 Validate POST /hardware REST API parameters
This patch ensures that all required parameters are sent in the request.
Diffstat (limited to 'sources/ogAdmServer.cpp')
-rw-r--r--sources/ogAdmServer.cpp3
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);
}