New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to create domain blocks when a stricter limit already exists in Admin UI #29127
Comments
@ClearlyClaire this is what I mentioned on this documentation change: mastodon/documentation#1417 (comment) When doing a look up for the domain block, or domain federation rule, we need to be comparing the severity and the domain |
iirc the behavior of the API endpoint being different from that of the admin controller is intentional, with the API being intended to be more straightforward. But the inability to apply a stricter block on a subdomain through the API is likely not intended, and it sounds like an unnecessary limitation. I'll look into it. On a side note, wildcards are not supported (and are unnecessary, as any domain block applies to subdomains too). |
But some |
Steps to reproduce the problem
/admin/instances?limited=1
to manage federationexample
(noop/none severity)test.example
observe that an error is returnedtest.example
observe that no error is returned and the block is successfully created.Expected behaviour
Both methods for creating domain blocks should have same behaviour
Actual behaviour
The API failed whilst the Admin UI succeeded
Detailed description
This bug affects IFTAS FediCheck, where we weren't observing the same logic as
DomainBlock.rule_for
when attempting to create a domain block, which meant an existing block ofexample
would fail the block creation oftest.example
leaving us out of sync with the Mastodon server (we also weren't handling the error response from the API correctly.Mastodon instance
No response
Mastodon version
main
Technical details
If this is happening on your own Mastodon server, please fill out those:
The text was updated successfully, but these errors were encountered: