mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
f32d7702bc
`get_args_from_history_or_saved_input` looked up saved-input rows by `id + workspace_id` only, without checking ownership or `is_public`. The `input` table has no RLS policy, so any authenticated workspace member could read another member's private saved-input args (which may hold credentials) just by knowing the UUID, even though `inputs/list` already scopes to `is_public OR created_by = caller`. Add `AND (is_public IS true OR created_by = $4)` to both `input`-table queries in the handler (the `?input=true` single-query branch and the default `v2_job UNION ALL input` branch), matching the predicate already used by `list_saved_inputs`. The `v2_job` branches are already covered by the table's RLS policies enforced via `SET LOCAL ROLE windmill_user` in `UserDB::begin()`, so they are left unchanged. Fixes WIN-2202 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>