From 157ea49328b100e2a746dd61a3153cf632fdbe6e Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Mar 2020 14:11:32 +0000 Subject: [PATCH 1/2] Fix isVerified returning false which would cause key backups uploads to be missing is_verified because it was set to `undefined` which would cause the backup to fail Fixes https://github.com/vector-im/riot-web/issues/12901 --- src/crypto/CrossSigning.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/CrossSigning.js b/src/crypto/CrossSigning.js index 1c3d3e207..1cfdeec24 100644 --- a/src/crypto/CrossSigning.js +++ b/src/crypto/CrossSigning.js @@ -574,9 +574,9 @@ export class DeviceTrustLevel { * @returns {bool} true if this device is verified via any means */ isVerified() { - return this.isLocallyVerified() || ( + return Boolean(this.isLocallyVerified() || ( this._trustCrossSignedDevices && this.isCrossSigningVerified() - ); + )); } /** From adbef16b9d8375421f37446230c9d5f6623e9b13 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Mar 2020 14:14:45 +0000 Subject: [PATCH 2/2] Also pass the parameter in --- src/crypto/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/index.js b/src/crypto/index.js index 7b5e69185..ad07374a0 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -1097,7 +1097,7 @@ Crypto.prototype._checkDeviceInfoTrust = function(userId, device) { userCrossSigning, device, trustedLocally, trustCrossSig, ); } else { - return new DeviceTrustLevel(false, false, trustedLocally); + return new DeviceTrustLevel(false, false, trustedLocally, false); } };