mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Invalidate memory cache when storing own cross-signing keys
When another device does cross-signing reset we would incorrectly cache the old keys indefinitely.
This commit is contained in:
parent
0095e1fb78
commit
64cc843952
1 changed files with 7 additions and 0 deletions
|
|
@ -96,5 +96,12 @@ func (mach *OlmMachine) storeCrossSigningKeys(ctx context.Context, crossSigningK
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clear internal cache so that it refreshes from crypto store
|
||||
if userID == mach.Client.UserID && mach.crossSigningPubkeys != nil {
|
||||
log.Debug().Msg("Resetting internal cross-signing key cache")
|
||||
mach.crossSigningPubkeys = nil
|
||||
mach.crossSigningPubkeysFetched = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue