Repository navigation
Conversation
An operator who blocks invites from non-admins, or refuses addresses through a third-party rules or spam checker module, expects that to cover every invite their server emails, as it does Synapse's own email invites. The admin check comes before the room checks, as Synapse makes it before its own. The address checks, like every refusal here, come before the limit, so a refused request doesn't spend it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZdGaj9bJcn5QeeUw8YXoF
…apse-controls # Conflicts: # modules/restricted-guests/synapse/README.md
Member
Author
|
CI failing is due to a failure on main. |
devonh
commented
Oct 10, 2026
| @@ -16,6 +16,7 @@ | |||
| from synapse.event_auth import get_named_level, get_user_power_level | |||
| from synapse.http.site import SynapseRequest | |||
Member
Author
There was a problem hiding this comment.
@sandhose Do we want these additional checks on the new guest email invites?
Synapse has these config options which would seem applicable to the module.
But I can also understand if we don't want to tie the different config options together.
I split this off as a separate PR so we can both decide on it as it's own thing and for it to be easily rolled back if we happen to merge it, then later decide we want to take it out.
Let me know what you think.
…apse-controls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkxQWj8RAKd7iZ1JQtXdxm
…apse-controls # Conflicts: # modules/restricted-guests/synapse/README.md
…apse-controls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0145EoXnCPYo2bnhuGTohX55
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of https://github.com/element-hq/backend-internal/issues/292
Applies Synapse's own email-invite controls to
POST /_synapse/client/invite_guests(#304):block_non_admin_invites: when enabled, a non-admin caller is refused (403).check_threepid_can_be_invitedand a spam checker'suser_may_send_3pid_inviterun for each address. If either refuses any address, the request is refused (403).Like every other refusal, these come before the per-inviter limit, so a refused request doesn't spend it.
This may or may not be desirable for the guest invites module, so I have split it off as it's own PR for us to deliberate on.