Skip to content
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

Fix backup sig validation with multiple sigs #944

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jun 7, 2019

verifySignature modifies the object so we need to clone if we're
verifying more than one signature.

Fixes element-hq/element-web#9357

verifySignature modifies the object so we need to clone if we're
verifying more than one signature.

Fixes element-hq/element-web#9357
@dbkr dbkr requested a review from a team June 7, 2019 10:07
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -371,7 +371,9 @@ Crypto.prototype.isKeyBackupTrusted = async function(backupInfo) {
try {
await olmlib.verifySignature(
this._olmDevice,
backupInfo.auth_data,
// verifySignature modifies the object so we need to copy
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine as a workaround, but maybe verifySignature should also be changed to not do that...? (It seems like other might also be confused by it...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah - I'm slightly hesitant to do it without fully understanding why it was done like that, although I suspect just for speed.

@dbkr dbkr merged commit e332a7d into develop Jun 7, 2019
@t3chguy t3chguy deleted the dbkr/verify_signature_modifies_the_object_because_everything_is_awful branch May 10, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup has an invalid signature from verified device
2 participants