wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
`Delay` body parameter in `PUT /cluster/restart`
Wazuh | Rev | Browser |
---|---|---|
X.Y.Z | xyzw | Chrome, Firefox, Safari, etc |
Description
When the dashboard restarts the cluster through the API, it sends a {"delay": 1500}
body, which is completely ignored since said endpoint does not expect a body:
2024/04/19 08:20:15 INFO: wazuh-wui 172.19.0.4 "PUT /cluster/restart" with parameters {} and body {"delay": 15000} done in 0.020s: 200
This happens at least when clicking the restart button after modifying a rule, although it might behaves the same way in other use cases. Also, when the cluster is disabled, PUT /manager/restart
is used instead without body:
"PUT /manager/restart" with parameters {} and body {} done in 0.012s: 200
Preconditions
- Enable clusterd in the manager's
ossec.conf
and restart it.
Steps to reproduce
- Navigate to Management > Rules > Edit any rule file.
- Save and restart cluster.
- Check
api.log
, the delay parameter is included in PUT /cluster/restart.
Expected Result
- The body should be empty for PUT /cluster/restart.
Actual Result
- It contains a useless parameter,
delay
.