diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-05 11:24:38 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-06 11:26:15 +0100 |
commit | 93028bd055b46a117ede58f85e74cc3b3f9a6a32 (patch) | |
tree | e68a95529a5b4bd628197bb1df8ed066a1544b65 | |
parent | bc1b958ceb9198fea232d9aa261ad7eeb5c9be06 (diff) |
#915 Validate POST /refresh REST API parameters
This patch ensures that all required parameters are sent in the request.
-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 3576f7f..dc6aa12 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -3885,6 +3885,9 @@ static int og_cmd_refresh(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, "Actualizar", CLIENTE_APAGADO); } |