diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-05 11:04:15 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-06 11:25:54 +0100 |
commit | d86ddce3f5b16436849a764f6fc854b8fe37dccf (patch) | |
tree | 1a9ba1e495ab6382592f042b41ba6bd37a7607b4 /admin | |
parent | 2aad3d9eaf3770666505bb0f59b639598561845c (diff) |
#915 Validate POST /reboot 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.cpp | 3 |
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 99562e4a..3770ec95 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp @@ -3905,6 +3905,9 @@ static int og_cmd_reboot(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, "Reiniciar", CLIENTE_OCUPADO); } |