From 8a1b38163583d4bfe0d36510e83cecfc23fc7533 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 12 May 2020 14:29:11 +0200 Subject: [PATCH 1/2] remove UI for upgrading 4S to sym enc --- src/DeviceListener.js | 8 ------- .../views/settings/CrossSigningPanel.js | 8 ------- .../views/toasts/SetupEncryptionToast.js | 24 ------------------- 3 files changed, 40 deletions(-) diff --git a/src/DeviceListener.js b/src/DeviceListener.js index d2ba8219db..27caba971e 100644 --- a/src/DeviceListener.js +++ b/src/DeviceListener.js @@ -225,14 +225,6 @@ export default class DeviceListener { }); } } - } else if (await cli.secretStorageKeyNeedsUpgrade()) { - ToastStore.sharedInstance().addOrReplaceToast({ - key: THIS_DEVICE_TOAST_KEY, - title: _t("Encryption upgrade available"), - icon: "verification_warning", - props: {kind: 'upgrade_ssss'}, - component: sdk.getComponent("toasts.SetupEncryptionToast"), - }); } else { // cross-signing is ready, and we don't need to upgrade encryption ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY); diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index cb04d2a018..c2c16615be 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -36,7 +36,6 @@ export default class CrossSigningPanel extends React.PureComponent { userSigningPrivateKeyCached: false, sessionBackupKeyCached: false, secretStorageKeyInAccount: false, - secretStorageKeyNeedsUpgrade: null, }; } @@ -88,7 +87,6 @@ export default class CrossSigningPanel extends React.PureComponent { const homeserverSupportsCrossSigning = await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"); const crossSigningReady = await cli.isCrossSigningReady(); - const secretStorageKeyNeedsUpgrade = await cli.secretStorageKeyNeedsUpgrade(); this.setState({ crossSigningPublicKeysOnDevice, @@ -100,7 +98,6 @@ export default class CrossSigningPanel extends React.PureComponent { secretStorageKeyInAccount, homeserverSupportsCrossSigning, crossSigningReady, - secretStorageKeyNeedsUpgrade, }); } @@ -150,7 +147,6 @@ export default class CrossSigningPanel extends React.PureComponent { secretStorageKeyInAccount, homeserverSupportsCrossSigning, crossSigningReady, - secretStorageKeyNeedsUpgrade, } = this.state; let errorSection; @@ -259,10 +255,6 @@ export default class CrossSigningPanel extends React.PureComponent { {_t("Homeserver feature support:")} {homeserverSupportsCrossSigning ? _t("exists") : _t("not found")} - - {_t("Secret Storage key format:")} - {secretStorageKeyNeedsUpgrade ? _t("outdated") : _t("up to date")} - {errorSection} diff --git a/src/components/views/toasts/SetupEncryptionToast.js b/src/components/views/toasts/SetupEncryptionToast.js index 75fd55378c..b5510e85b6 100644 --- a/src/components/views/toasts/SetupEncryptionToast.js +++ b/src/components/views/toasts/SetupEncryptionToast.js @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import Modal from '../../../Modal'; -import { MatrixClientPeg } from '../../../MatrixClientPeg'; import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; import DeviceListener from '../../../DeviceListener'; @@ -31,7 +30,6 @@ export default class SetupEncryptionToast extends React.PureComponent { 'set_up_encryption', 'verify_this_session', 'upgrade_encryption', - 'upgrade_ssss', ]).isRequired, }; @@ -39,24 +37,6 @@ export default class SetupEncryptionToast extends React.PureComponent { DeviceListener.sharedInstance().dismissEncryptionSetup(); }; - async _waitForCompletion() { - if (this.props.kind === 'upgrade_ssss') { - return new Promise(resolve => { - const recheck = async () => { - const needsUpgrade = await MatrixClientPeg.get().secretStorageKeyNeedsUpgrade(); - if (!needsUpgrade) { - MatrixClientPeg.get().removeListener('accountData', recheck); - resolve(); - } - }; - MatrixClientPeg.get().on('accountData', recheck); - recheck(); - }); - } else { - return; - } - } - _onSetupClick = async () => { if (this.props.kind === "verify_this_session") { Modal.createTrackedDialog('Verify session', 'Verify session', SetupEncryptionDialog, @@ -68,7 +48,6 @@ export default class SetupEncryptionToast extends React.PureComponent { ); try { await accessSecretStorage(); - await this._waitForCompletion(); } finally { modal.close(); } @@ -82,8 +61,6 @@ export default class SetupEncryptionToast extends React.PureComponent { return _t('Verify yourself & others to keep your chats safe'); case 'verify_this_session': return _t('Other users may not trust it'); - case 'upgrade_ssss': - return _t('Update your secure storage'); } } @@ -92,7 +69,6 @@ export default class SetupEncryptionToast extends React.PureComponent { case 'set_up_encryption': return _t('Set up'); case 'upgrade_encryption': - case 'upgrade_ssss': return _t('Upgrade'); case 'verify_this_session': return _t('Verify'); From b3c641184ba5b66706b808fa34088e91cd1b4d90 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 12 May 2020 14:54:49 +0200 Subject: [PATCH 2/2] remove obsolete strings --- src/i18n/strings/en_EN.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a24b2bde73..1d86947177 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -566,7 +566,6 @@ "Review": "Review", "Verify yourself & others to keep your chats safe": "Verify yourself & others to keep your chats safe", "Other users may not trust it": "Other users may not trust it", - "Update your secure storage": "Update your secure storage", "Set up": "Set up", "Upgrade": "Upgrade", "Verify": "Verify", @@ -618,9 +617,6 @@ "in account data": "in account data", "Homeserver feature support:": "Homeserver feature support:", "exists": "exists", - "Secret Storage key format:": "Secret Storage key format:", - "outdated": "outdated", - "up to date": "up to date", "Your homeserver does not support session management.": "Your homeserver does not support session management.", "Unable to load session list": "Unable to load session list", "Confirm deleting these sessions by using Single Sign On to prove your identity.|other": "Confirm deleting these sessions by using Single Sign On to prove your identity.",