summaryrefslogtreecommitdiffstats
path: root/sources/ogAdmServer.cpp
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-11-05 11:04:15 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-11-06 11:25:54 +0100
commit0a41d5d02f703a051a0a79d4f7bfa3db4caee77c (patch)
tree9c944ced08a0d7685a917a6b46fb0223e2302407 /sources/ogAdmServer.cpp
parentacf9cdf8d15b3679c0a7b9ea724b42cdf6b03092 (diff)
#915 Validate POST /reboot 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 99562e4..3770ec9 100644
--- a/sources/ogAdmServer.cpp
+++ b/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);
}