Include banned and invited servers in event destination set
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- distributed-systems
Direzione di ricerca
Inizia da StateService.getServerSetInRoom e segui come sendEventToAllServersInRoom costruisce le destinazioni per gli eventi di ban e unban. Confronta il filtro attuale dei membri con il comportamento dei resident server di Matrix descritto qui, quindi verifica che un ciclo di ban/unban recapiti l’evento intermedio di leave e consenta di elaborare il successivo invito senza un errore di stato mancante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
getServerSetInRoom (in StateService) only includes servers that have at least one user with membership: 'join'. When a user is banned, their membership changes from join to ban. If they were the only user from their server, that server is excluded from the destination set for subsequent events — including the unban event.
What happens today
- Server A bans a user from Server B
- Ban event is sent to Server B (user still had
joinwhen server set was computed) - Server B processes the ban, membership updates to
ban - Server A unbans the user (sends
membership: leaveviakickUser) sendEventToAllServersInRoomcomputes the server set — Server B has nojoinmembers → excluded from destinations- The leave (unban) event is never delivered to Server B
- Server A tries to re-invite the user — builds an invite whose
prev_eventsreference the leave event - Server A sends the invite to Server B via
/v2/invite - Server B has
m.room.create(user had previously joined), soprocessInvitecallshandlePdu handlePdu→_resolveStateAtEvent→ looks forstateIdofprev_events→ the leave event was never received → "no previous state for event" error- Invite processing fails, Server A gets a 500
Impact
- After a ban+unban cycle in a federated room, the user cannot be re-invited
- The state chain on the remote server becomes broken because intermediate events are missing
- Affects RC ↔ RC federation. RC ↔ Element (Synapse) works because Synapse handles server routing differently
Root cause
The Matrix spec states that servers should continue receiving events for rooms where they have any membership state (join, invite, ban, leave with prior membership). Our getServerSetInRoom only considers join membership, which is too restrictive.
Proposed fix
getServerSetInRoom should include servers that have users with ban or invite membership in addition to join. A banned user's server still needs to receive room events (at minimum the unban event) to maintain a consistent state chain.
From the spec perspective, the set of servers that should receive events ("resident servers") includes any server with at least one user with membership join or invite. For ban, the server should receive at minimum the events needed to transition out of the banned state.
Simpler alternative: when sending a ban-related event (membership: leave after ban), explicitly add the target user's server to the destination set regardless of their current membership.
- Lingua principale
- TypeScript
- Stelle
- 17
- Fork
- 18
- Merge medio
- 2h 11m
- PR unite (30g)
- 2
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RocketChat/homeserver
-
pruneEventDict and signEvent's `prune` flag should go away entirely, replaced byForse di nuovo libera @sampaiodiego l’ha presa 76 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad: type: feature
RocketChat/homeserver#411 · 1 commento · 1 assegnatario ·
-
we need a map of rooms and destinations to avoid having to get rooms state just to send an event to all servers in the room.Forse di nuovo libera @sampaiodiego l’ha presa 249 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad: type: feature
RocketChat/homeserver#342 · 4 commenti · 1 assegnatario ·
-
this may not be the best place to do this validationForse di nuovo libera @sampaiodiego l’ha presa 326 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad:
RocketChat/homeserver#322 · 1 commento · 1 reazione · 1 assegnatario ·
-
check if all sendEventToAllServersInRoom should be followed by an emitterForse di nuovo libera @ggazzo l’ha presa 359 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad:
RocketChat/homeserver#304 · 1 assegnatario ·
-
return only the IDs, not the full eventsForse di nuovo libera @rodrigok l’ha presa 399 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad:
RocketChat/homeserver#277 · 1 commento · 1 assegnatario ·
Tutte le issue di RocketChat/homeserver
Issue simili
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
amosblomqvist/learnharness#758 ·
I maintainer di solito rispondono entro 2 giorni
-
Change WorkspacesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-market/dsh-market#1210 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
trustjonathan/STUDY-HUB#13 ·