Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Delete stale non-e2e devices for users, take 3 #15183

Merged
merged 5 commits into from
Mar 29, 2023

Conversation

erikjohnston
Copy link
Member

This should help reduce the number of devices e.g. simple bots the repeatedly login rack up.

We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.

Basically #14595, but makes sure that we only have one delete going per-person at a time, and with a longer timeout.

@erikjohnston erikjohnston marked this pull request as ready for review March 2, 2023 11:38
@erikjohnston erikjohnston requested a review from a team as a code owner March 2, 2023 11:38
This should help reduce the number of devices e.g. simple bots the repeatedly login rack up.

We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.
synapse/handlers/register.py Outdated Show resolved Hide resolved
synapse/handlers/register.py Outdated Show resolved Hide resolved
synapse/storage/databases/main/devices.py Outdated Show resolved Hide resolved
synapse/storage/databases/main/devices.py Show resolved Hide resolved
erikjohnston and others added 3 commits March 6, 2023 10:06
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@erikjohnston erikjohnston requested a review from clokep March 6, 2023 10:10
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets give it a go.

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@erikjohnston
Copy link
Member Author

Waiting to merge this until we are ready to put this on matrix.org, as previous iterations of this change have caused production issues.

@erikjohnston erikjohnston merged commit 78cdb72 into develop Mar 29, 2023
@erikjohnston erikjohnston deleted the erikj/delete_devices3 branch March 29, 2023 11:07
erikjohnston added a commit that referenced this pull request Mar 31, 2023
erikjohnston added a commit that referenced this pull request Mar 31, 2023
* Revert "Fix registering a device on an account with lots of devices (#15348)"

This reverts commit f0d8f66.

* Revert "Delete stale non-e2e devices for users, take 3 (#15183)"

This reverts commit 78cdb72.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants