Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

"Unbans do not propagate to federated servers" workaround is broken #4683

Closed
turt2live opened this issue Feb 19, 2019 · 2 comments
Closed

"Unbans do not propagate to federated servers" workaround is broken #4683

turt2live opened this issue Feb 19, 2019 · 2 comments
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@turt2live
Copy link
Member

Unbans currently don't work over federation (#1563), and the workaround for the case of the last user of a homeserver being banned no longer works.

Previously, if all your users were banned in a room you could invite (and join) a different user on the homeserver to the room so the server picks up the new room state, unsticking the ban for everyone else. In recent updates (last known working before 0.34, but not in 0.34) this workaround broke and instead the invited user gets "you have not been invited to this room" despite having a valid and known invite event.

Historically, here's what I found out about a room in a similar situation:

t2bot.io was previously involved in a room, and was subsequently evicted. After some time has passed (lots of time), a re-invite was issued to a previously banned user. This failed because obviously it did. Inviting another t2bot.io user that wasn't ever banned in the room results in "You are not invited to this room"

As far as I can tell, it's using the wrong auth events for the invite and therefore unable to find the membership event, failing the caller_is_invited check

The auth events on the actual invite don't appear in debugging, and old events from when the server last participated in the room are being used instead.

"It using the wrong events" being t2bot.io

The workaround was to use the manhole and run the following (disclaimer: use at your own risk):

hs.get_handlers().federation_handler.do_invite_join(['matrix.org'], '!stuck:example.org', '@travis:t2bot.io', {})
@neilisfragile neilisfragile added z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Feb 26, 2019
@aaronraimist
Copy link
Contributor

aaronraimist commented Aug 30, 2019

The original workaround with using a second user on the server seems to work again now

@turt2live
Copy link
Member Author

\o/ I'm going to close this but we really should fix #1563 :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants