This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Database stores multiple cross-signing keys of the same type for a given user #16398
Labels
A-E2EE
End-to-end encryption for Matrix clients
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
The Matrix protocol assumes that each user will have at most one cross-signing key of a given type (
master
,self_signing
,user_signing
) at a time.However, it is possible for clients to replace the existing keys with further calls to
POST /_matrix/client/v3/keys/device_signing/upload
. When that happens, Synapse appears to just add the new key toe2e_cross_signing_keys
without deleting the old one. Somematrix.org
users have accumulated over 2000 keys of each type.This is redundant data which we have no business keeping (and it sucks up disk space).
There also seems to be a codepath somewhere where we end up with multiple copies of a key for a remote user get stored in the database.
Ideally the
e2e_cross_signing_keys
table should beUNIQUE
in(user_id, keytype)
.The text was updated successfully, but these errors were encountered: