diff --git a/CHANGES.md b/CHANGES.md index d646ee3ca..890db41aa 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,11 @@ +## Changes in 1.10.8 (2023-03-28) + +🙌 Improvements + +- Verification: Display upgrade verification prompt ([#7454](https://github.com/vector-im/element-ios/pull/7454)) +- Upgrade MatrixSDK version ([v0.26.5](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.26.5)). + + ## Changes in 1.10.7 (2023-03-22) 🙌 Improvements diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 698eeaa2b..4b4e48563 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.10.7 -CURRENT_PROJECT_VERSION = 1.10.7 +MARKETING_VERSION = 1.10.8 +CURRENT_PROJECT_VERSION = 1.10.8 diff --git a/Podfile b/Podfile index d7a2bb7ac..cfdc001b2 100644 --- a/Podfile +++ b/Podfile @@ -16,7 +16,7 @@ use_frameworks! # - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI # # Warning: our internal tooling depends on the name of this variable name, so be sure not to change it -$matrixSDKVersion = '= 0.26.4' +$matrixSDKVersion = '= 0.26.5' # $matrixSDKVersion = :local # $matrixSDKVersion = { :branch => 'develop'} # $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } } diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 8a9f712c3..5b98db946 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -1560,6 +1560,11 @@ Tap the + to start adding people."; "key_verification_self_verify_current_session_alert_message" = "Other users may not trust it."; "key_verification_self_verify_current_session_alert_validate_action" = "Verify"; +// Legacy to Rust security upgrade + +"key_verification_self_verify_security_upgrade_alert_title" = "App updated"; +"key_verification_self_verify_security_upgrade_alert_message" = "Secure messaging has been improved with the latest update. Please re-verify your device."; + // Unverified sessions "key_verification_alert_title" = "You have unverified sessions"; "key_verification_alert_body" = "Review to ensure your account is safe."; diff --git a/Riot/Experiments/CryptoSDKFeature.swift b/Riot/Experiments/CryptoSDKFeature.swift index 96c743951..8404675c2 100644 --- a/Riot/Experiments/CryptoSDKFeature.swift +++ b/Riot/Experiments/CryptoSDKFeature.swift @@ -40,7 +40,18 @@ import MatrixSDKCrypto RiotSettings.shared.enableCryptoSDK } + var needsVerificationUpgrade: Bool { + get { + return RiotSettings.shared.showVerificationUpgradeAlert + } + set { + RiotSettings.shared.showVerificationUpgradeAlert = newValue + } + } + private static let FeatureName = "ios-crypto-sdk" + private static let FeatureNameV2 = "ios-crypto-sdk-v2" + private let remoteFeature: RemoteFeaturesClientProtocol private let localFeature: PhasedRolloutFeature @@ -98,6 +109,13 @@ import MatrixSDKCrypto } private func isFeatureEnabled(userId: String) -> Bool { - remoteFeature.isFeatureEnabled(Self.FeatureName) || localFeature.isEnabled(userId: userId) + // This feature includes app version with a bug, and thus will not be rolled out to 100% users + remoteFeature.isFeatureEnabled(Self.FeatureName) + + // Second version of the remote feature with a bugfix and released eventually to 100% users + || remoteFeature.isFeatureEnabled(Self.FeatureNameV2) + + // Local feature + || localFeature.isEnabled(userId: userId) } } diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index b31ee8596..3cde53fe9 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -3027,6 +3027,14 @@ public class VectorL10n: NSObject { public static var keyVerificationSelfVerifyCurrentSessionAlertValidateAction: String { return VectorL10n.tr("Vector", "key_verification_self_verify_current_session_alert_validate_action") } + /// Secure messaging has been improved with the latest update. Please re-verify your device. + public static var keyVerificationSelfVerifySecurityUpgradeAlertMessage: String { + return VectorL10n.tr("Vector", "key_verification_self_verify_security_upgrade_alert_message") + } + /// App updated + public static var keyVerificationSelfVerifySecurityUpgradeAlertTitle: String { + return VectorL10n.tr("Vector", "key_verification_self_verify_security_upgrade_alert_title") + } /// Review public static var keyVerificationSelfVerifyUnverifiedSessionsAlertValidateAction: String { return VectorL10n.tr("Vector", "key_verification_self_verify_unverified_sessions_alert_validate_action") diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index efb9a8e1c..06746801c 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -211,6 +211,9 @@ final class RiotSettings: NSObject { @UserDefault(key: "hideVerifyThisSessionAlert", defaultValue: false, storage: defaults) var hideVerifyThisSessionAlert + @UserDefault(key: "showVerificationUpgradeAlert", defaultValue: false, storage: defaults) + var showVerificationUpgradeAlert + @UserDefault(key: "matrixApps", defaultValue: false, storage: defaults) var matrixApps diff --git a/Riot/Modules/Home/AllChats/AllChatsViewController.swift b/Riot/Modules/Home/AllChats/AllChatsViewController.swift index 1c72df342..ea96873ba 100644 --- a/Riot/Modules/Home/AllChats/AllChatsViewController.swift +++ b/Riot/Modules/Home/AllChats/AllChatsViewController.swift @@ -985,8 +985,20 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol { private func presentVerifyCurrentSessionAlert(with session: MXSession) { MXLog.debug("[AllChatsViewController] presentVerifyCurrentSessionAlertWithSession") - let alert = UIAlertController(title: VectorL10n.keyVerificationSelfVerifyCurrentSessionAlertTitle, - message: VectorL10n.keyVerificationSelfVerifyCurrentSessionAlertMessage, + let title: String + let message: String + + if let feature = MXSDKOptions.sharedInstance().cryptoSDKFeature, + feature.isEnabled && feature.needsVerificationUpgrade { + title = VectorL10n.keyVerificationSelfVerifySecurityUpgradeAlertTitle + message = VectorL10n.keyVerificationSelfVerifySecurityUpgradeAlertMessage + } else { + title = VectorL10n.keyVerificationSelfVerifyCurrentSessionAlertTitle + message = VectorL10n.keyVerificationSelfVerifyCurrentSessionAlertMessage + } + + let alert = UIAlertController(title: title, + message: message, preferredStyle: .alert) alert.addAction(UIAlertAction(title: VectorL10n.keyVerificationSelfVerifyCurrentSessionAlertValidateAction,