-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix enabling key backup not working if there is an untrusted key backup #30707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…up on the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, a couple of nits it might be nice to clean up but generally LGTM
src/components/viewmodels/settings/encryption/KeyStoragePanelViewModel.ts
Outdated
Show resolved
Hide resolved
src/components/viewmodels/settings/encryption/KeyStoragePanelViewModel.ts
Outdated
Show resolved
Hide resolved
currentKeyBackup.trustInfo, | ||
); | ||
// Check if the current key backup can be used. Either of these properties causes the key backup to be used. | ||
if (currentKeyBackup.trustInfo.trusted || currentKeyBackup.trustInfo.matchesDecryptionKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really feels like this ought to be exposed more explicitly by checkKeyBackupAndEnable
(a result
field, maybe?) rather than something you have to reverse-engineer, but I'll not insist on that change.
…iewModel.ts Co-authored-by: Richard van der Hoff <[email protected]>
…iewModel.ts Co-authored-by: Richard van der Hoff <[email protected]>
Fixes #30706Possibly fixes #29856, and certainly improves logging of it.
This a proposed fix for the linked issue, albeit this is mostly working off my debugging assumptions and needs crypto scrutiny here.
The summary of #30706 is users may have untrusted key backups on their account that are unusable by Element Web, and in those cases we should proceed to resetting and creating a new backup rather than flaking out. I've also added abundant logging to this section as it's important to understand the state of the user's account for future debugging.
Checklist
public
/exported
symbols have accurate TSDoc documentation.