Skip to content
Snippets Groups Projects
  1. Oct 12, 2021
  2. Oct 11, 2021
  3. Oct 08, 2021
  4. Oct 07, 2021
  5. Oct 06, 2021
  6. Oct 05, 2021
    • David Robertson's avatar
      Fix potential leak of per-room profiles when the user dir is rebuilt. (#10981) · 4f00432c
      David Robertson authored
      
      There are two steps to rebuilding the user directory:
      
      1. a scan over rooms, followed by
      2. a scan over local users.
      
      The former reads avatars and display names from the `room_memberships`
      table and therefore contains potentially private avatars and
      display names. The latter reads from the the `profiles` table which only
      contains public data; moreover it will overwrite any private profiles
      that the rooms scan may have written to the user directory. This means
      that the rebuild could leak private user while the rebuild was in
      progress, only to later cover up the leaks once the rebuild had completed.
      
      This change skips over local users when writing user_directory rows
      when scanning rooms. Doing so means that it'll take longer for a rebuild
      to make local users searchable, which is unfortunate. I think a future
      PR can improve this by swapping the order of the two steps above. (And
      indeed there's more to do here, e.g. copying from `profiles` without
      going via Python.)
      
      Small tidy-ups while I'm here:
      
      * Remove duplicated code from test_initial. This was meant to be pulled into `purge_and_rebuild_user_dir`.
      * Move `is_public` before updating sharing tables. No functional change; it's still before the first read of `is_public`.
      * Don't bother creating a set from dict keys. Slightly nicer and makes the code simpler.
      
      Co-authored-by: default avatarRichard van der Hoff <1389908+richvdh@users.noreply.github.com>
      4f00432c
    • Eric Eastwood's avatar
      Fix logic flaw preventing tracking of MSC2716 events in existing room versions (#10962) · 392863fb
      Eric Eastwood authored
      We correctly allowed using the MSC2716 batch endpoint for
      the room creator in existing room versions but accidentally didn't track
      the events because of a logic flaw.
      
      This prevented you from connecting subsequent chunks together because it would
      throw the unknown batch ID error.
      
      We only want to process MSC2716 events when:
      
       - The room version supports MSC2716
       - Any room where the homeserver has the `msc2716_enabled` experimental feature enabled and the event is from the room creator
      392863fb
    • Brendan Abolivier's avatar
      Merge branch 'master' into develop · 2faac70e
      Brendan Abolivier authored
      2faac70e
Loading