Skip to content
Snippets Groups Projects
  1. May 28, 2021
  2. May 27, 2021
  3. May 26, 2021
  4. May 25, 2021
  5. May 24, 2021
  6. May 23, 2021
  7. May 22, 2021
  8. May 21, 2021
  9. May 17, 2021
    • Timo Kösters's avatar
      fix: run state res with old current state again · ae41bc50
      Timo Kösters authored
      I'm a bit torn on the "auth check based on the current state of the
      room". It can mean multiple things:
      
      1. The state of the room before the homeserver looked at the event at
      all. But that means if a message event from a user arrives, but we
      didn't see their join event before, we soft fail the message (even
      though we would find the join event when going through the auth events
      of the event and doing state res)
      
      2. The state of the room after doing state-res with the event and our
      previous room state. We need to do this state resolution to find the new
      room state anyway, so we could just use the new room state for the auth
      check. The problem is that if the incoming event is a membership leave
      event, the new room state does not allow another leave event. This is
      obviously the wrong option.
      
      3. The state of the room after doing state-res with the state **before**
      the event and our previous room state. This will mean a lot more
      calculations because we have to run state-res again
      
      We used 2. before and now use 1. again
      ae41bc50
Loading