Skip to content
Snippets Groups Projects
  1. Jan 30, 2023
    • David Robertson's avatar
      Handle malformed values of `notification.room` in power level events (#14942) · 510d4b06
      David Robertson authored
      * Better test for bad values in power levels events
      
      The previous test only checked that Synapse didn't raise an exception,
      but didn't check that we had correctly interpreted the value of the
      dodgy power level.
      
      It also conflated two things: bad room notification levels, and bad user
      levels. There _is_ logic for converting the latter to integers, but we
      should test it separately.
      
      * Check we ignore types that don't convert to int
      
      * Handle `None` values in `notifications.room`
      
      * Changelog
      
      * Also test that bad values are rejected by event auth
      
      * Docstring
      
      * linter scripttttttttt
      Unverified
      510d4b06
  2. Sep 07, 2022
  3. Jul 13, 2022
  4. Jun 17, 2022
  5. Jun 15, 2022
    • Richard van der Hoff's avatar
      Move some event auth checks out to a different method (#13065) · 8ecf6be1
      Richard van der Hoff authored
      * Add auth events to events used in tests
      
      * Move some event auth checks out to a different method
      
      Some of the event auth checks apply to an event's auth_events, rather than the
      state at the event - which means they can play no part in state
      resolution. Move them out to a separate method.
      
      * Rename check_auth_rules_for_event
      
      Now it only checks the state-dependent auth rules, it needs a better name.
      Unverified
      8ecf6be1
  6. Jun 12, 2022
  7. Oct 18, 2021
    • Richard van der Hoff's avatar
      Check *all* auth events for room id and rejection (#11009) · a5d2ea3d
      Richard van der Hoff authored
      This fixes a bug where we would accept an event whose `auth_events` include
      rejected events, if the rejected event was shadowed by another `auth_event`
      with same `(type, state_key)`.
      
      The approach is to pass a list of auth events into
      `check_auth_rules_for_event` instead of a dict, which of course means updating
      the call sites.
      
      This is an extension of #10956.
      Unverified
      a5d2ea3d
  8. Oct 01, 2021
  9. Sep 30, 2021
  10. Sep 29, 2021
    • Richard van der Hoff's avatar
      Split `event_auth.check` into two parts (#10940) · 428174f9
      Richard van der Hoff authored
      Broadly, the existing `event_auth.check` function has two parts:
       * a validation section: checks that the event isn't too big, that it has the rught signatures, etc. 
         This bit is independent of the rest of the state in the room, and so need only be done once 
         for each event.
       * an auth section: ensures that the event is allowed, given the rest of the state in the room.
         This gets done multiple times, against various sets of room state, because it forms part of
         the state res algorithm.
      
      Currently, this is implemented with `do_sig_check` and `do_size_check` parameters, but I think
      that makes everything hard to follow. Instead, we split the function in two and call each part
      separately where it is needed.
      Unverified
      428174f9
  11. Aug 09, 2021
  12. Jul 26, 2021
  13. Jul 14, 2021
  14. Apr 14, 2021
  15. Mar 31, 2021
  16. Feb 16, 2021
  17. May 15, 2020
  18. May 14, 2020
  19. Mar 09, 2020
  20. Feb 07, 2020
  21. Jan 28, 2020
  22. May 10, 2019
  23. Apr 01, 2019
  24. Jan 25, 2019
  25. Aug 10, 2018
  26. Jul 09, 2018
  27. Jun 14, 2018
Loading