mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 18:18:47 +01:00
Spreading the caller's arguments alongside the task name let a body set `name` and redirect the run, so an authorized caller could reach a task the route had just refused: one the API does not surface, or one whose `manual_run` is off. The endpoint checked the name from the path, and the worker then resolved whatever name the payload ended up holding. Nest the caller's arguments under `task_kwargs` instead of spreading them. Ordering the spread so the trusted name wins would also close the hole, but nesting makes the collision impossible rather than order-dependent, and leaves a task free to take an argument called name. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>