mirror of
https://github.com/knadh/listmonk.git
synced 2025-10-29 10:05:52 +08:00
This permission was never checked for and had an unintended consequence of allowing a non-superadmin user to execute arbitrary queries (expected), but getting a superadmin session by joining the `sessions` table. This patch: - Introduces a table allowlist that uses the Postgres query plan (JSON) and validate the referenced tables against the allowed ones on arbitrary queries issued to the various `/subscribers` APIs. - Explicitly adds the missing `subscribers:sql_query` permission check to all handlers that accept `query`. - Introduces a new `search` parameter on all handlers that accept `query`. This parameter is an interface over the default name/email substring search instead of relying on `query`. |
||
|---|---|---|
| .. | ||
| bounces.go | ||
| campaigns.go | ||
| core.go | ||
| dashboard.go | ||
| lists.go | ||
| media.go | ||
| roles.go | ||
| settings.go | ||
| subscribers.go | ||
| subscriptions.go | ||
| templates.go | ||
| users.go | ||