mirror of
https://github.com/knadh/listmonk.git
synced 2025-11-17 22:59:18 +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`. |
||
|---|---|---|
| .. | ||
| models.go | ||
| queries.go | ||
| settings.go | ||