summaryrefslogtreecommitdiffstats
path: root/admin
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
commita0df5af7248f31bab8a799268e35373936d5911c (patch)
tree2338c3f1b7ff0664f2cad36d2a406a06f4233fef /admin
parent34024600911211490ce506508dc4b0f1d7610e1f (diff)
#915 Validate POST /hardware REST API parameters
This patch ensures that all required parameters are sent in the request.
Diffstat (limited to 'admin')
-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 dc6aa129..db95298c 100644
--- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
+++ b/admin/Sources/Services/ogAdmServer/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);
}