Skip to content

fix: read tenantFilter from body on spam filter, backup and exclude-tenant endpoints - #913

Merged
KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
kris6673:fix/tenantfilter-body-fallback
Oct 15, 2026
Merged

KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
kris6673:fix/tenantfilter-body-fallback

Conversation

@kris6673

Copy link
Copy Markdown
Contributor

Summary

POST actions sent through CippApiDialog put tenantFilter in the request body. Every sibling spam filter endpoint reads it as Query ?? Body, but these did not:

  • EditSpamFilter: read the query only, so enable/disable on Spamfilter rules got a $null tenant and failed. Its State line also fell back on itself ($State ?? ...).
  • RemoveSpamfilter: $Request.Query.tenantFilter ?? $Request.Query.tenantFilter, so delete failed the same way.
  • ExecListBackup: the backup download and preview from Configuration Backup send the tenant in the body.
  • ExecExcludeTenant: the remove branch reported "We've removed from the excluded tenants" and logged no tenant, because it read a query value the frontend never sends. Both branches now use the resolved tenants' default domain names.

Testing

  • All files parse cleanly.

…enant endpoints

- EditSpamFilter read tenantFilter from the query only; CippApiDialog sends it in the POST body, so enable/disable failed
- EditSpamFilter: State fell back on itself ($State ?? ...) and was always null from query
- RemoveSpamfilter fell back Query ?? Query; second operand is now Body
- ExecListBackup: add body fallback for tenantFilter
- ExecExcludeTenant: name the resolved tenants in the result and log instead of an unset query value
@kris6673
kris6673 marked this pull request as ready for review October 14, 2026 11:03
@KelvinTegelaar
KelvinTegelaar merged commit 6330ac4 into CyberDrain:dev Oct 15, 2026
3 of 5 checks passed
@kris6673
kris6673 deleted the fix/tenantfilter-body-fallback branch October 16, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants