mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Fix invalidating OTK count cache after claim (#10875)
The invalidation was missing in `_claim_e2e_one_time_key_returning`, which is used on SQLite 3.24+ and Postgres. This could break e2ee if nothing else happened to invalidate the caches before the keys ran out. Signed-off-by: Tulir Asokan <tulir@beeper.com>
This commit is contained in:
parent
8f2a52766b
commit
03db6701d5
1
changelog.d/10875.bugfix
Normal file
1
changelog.d/10875.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix invalidating one-time key count cache after claiming keys. Contributed by Tulir at Beeper.
|
@ -824,6 +824,10 @@ class EndToEndKeyWorkerStore(EndToEndKeyBackgroundStore):
|
||||
if otk_row is None:
|
||||
return None
|
||||
|
||||
self._invalidate_cache_and_stream(
|
||||
txn, self.count_e2e_one_time_keys, (user_id, device_id)
|
||||
)
|
||||
|
||||
key_id, key_json = otk_row
|
||||
return f"{algorithm}:{key_id}", key_json
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user