You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Agent delete confirmation modal names the wrong agent #827
On the admin agents page, clicking delete on any row opens a confirmation modal that always names the first agent in the list instead of the agent we clicked.
The handler reads the correct UUID from the clicked row and then builds the modal from the wrong object (web/htdocs/js/shield.js:715-717):
The DELETE request a few lines down uses agent_uuid, so the correct agent is removed and no data is lost. The defect is confined to the confirmation text. With one agent registered nobody notices. With several, the modal asks the operator to confirm an irreversible action against a name they did not choose, which is where a display bug does real damage.
The fix is to find the clicked agent in data.agents by UUID and pass that to the template.
Introduced in 7391134 (2019-12-17), still present on develop at 21bea2f.
Activity