This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix potential leak of per-room profiles when the user dir is rebuilt. #10981
Merged
Commits on Oct 4, 2021
-
Conceal local user nicknames when rebuilding dir
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 displaynames from the `room_memberships` table and therefore contains potentially private avatars and displaynames. 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, but would eventually cover up the leaks once the rebuild 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.)
David Robertson committedOct 4, 2021 Configuration menu - View commit details
-
Copy full SHA for 5ee9fef - Browse repository at this point
Copy the full SHA 5ee9fefView commit details -
Remove duplicated code from test_initial
This was meant to be pulled into `purge_and_rebuild_user_dir`
David Robertson committedOct 4, 2021 Configuration menu - View commit details
-
Copy full SHA for 4e69df4 - Browse repository at this point
Copy the full SHA 4e69df4View commit details -
Move
is_public
before updating sharing tablesNo functional change; it's still before the first read of `is_public`.
David Robertson committedOct 4, 2021 Configuration menu - View commit details
-
Copy full SHA for b9254eb - Browse repository at this point
Copy the full SHA b9254ebView commit details -
Don't bother creating a set from dict keys
Slightly nicer and makes the code simpler.
David Robertson committedOct 4, 2021 Configuration menu - View commit details
-
Copy full SHA for b10d6a4 - Browse repository at this point
Copy the full SHA b10d6a4View commit details -
David Robertson committed
Oct 4, 2021 Configuration menu - View commit details
-
Copy full SHA for e6880b7 - Browse repository at this point
Copy the full SHA e6880b7View commit details
Commits on Oct 5, 2021
-
Don't hit the private branch if room is public and users_with_profile…
… is empty Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f20d78c - Browse repository at this point
Copy the full SHA f20d78cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 118eecf - Browse repository at this point
Copy the full SHA 118eecfView commit details -
David Robertson committed
Oct 5, 2021 Configuration menu - View commit details
-
Copy full SHA for abd943a - Browse repository at this point
Copy the full SHA abd943aView commit details -
David Robertson committed
Oct 5, 2021 Configuration menu - View commit details
-
Copy full SHA for 7ea8188 - Browse repository at this point
Copy the full SHA 7ea8188View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.