diff --git a/LibSession-Util b/LibSession-Util index af0ab996d..2bf8c8144 160000 --- a/LibSession-Util +++ b/LibSession-Util @@ -1 +1 @@ -Subproject commit af0ab996da46bcbeeea5e70831cda7e23c955243 +Subproject commit 2bf8c81443494f227a9509ddd95889f196b668d6 diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 611f2a7f0..09b821a47 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -7673,7 +7673,7 @@ CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 476; + CURRENT_PROJECT_VERSION = 478; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -7751,7 +7751,7 @@ CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 476; + CURRENT_PROJECT_VERSION = 478; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; diff --git a/Session/Conversations/Settings/ThreadSettingsViewModel.swift b/Session/Conversations/Settings/ThreadSettingsViewModel.swift index ad08b0521..69205978e 100644 --- a/Session/Conversations/Settings/ThreadSettingsViewModel.swift +++ b/Session/Conversations/Settings/ThreadSettingsViewModel.swift @@ -588,7 +588,8 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi .boolValue( threadViewModel.threadOnlyNotifyForMentions == true, oldValue: ((previous?.threadViewModel ?? threadViewModel).threadOnlyNotifyForMentions == true) - ) + ), + accessibility: Accessibility(identifier: "Notify for Mentions Only - Switch") ), isEnabled: ( ( @@ -629,7 +630,8 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi .boolValue( threadViewModel.threadMutedUntilTimestamp != nil, oldValue: ((previous?.threadViewModel ?? threadViewModel).threadMutedUntilTimestamp != nil) - ) + ), + accessibility: Accessibility(identifier: "Mute - Switch") ), isEnabled: ( ( @@ -678,7 +680,8 @@ class ThreadSettingsViewModel: SessionTableViewModel, NavigationItemSource, Navi .boolValue( threadViewModel.threadIsBlocked == true, oldValue: ((previous?.threadViewModel ?? threadViewModel).threadIsBlocked == true) - ) + ), + accessibility: Accessibility(identifier: "Block This User - Switch") ), accessibility: Accessibility( identifier: "\(ThreadSettingsViewModel.self).block", diff --git a/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift b/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift index 21d06eae9..f26373861 100644 --- a/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift +++ b/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift @@ -168,9 +168,13 @@ public extension Crypto.Generator { var maybePlaintext: UnsafeMutablePointer? = nil var plaintextLen: Int = 0 + // Note: We should only need a 32 byte key but there was a bug in 2.7.1 where we + // started generating 64 byte keys so, in order to support those, we accept allow + // both and the C code just takes the first 32 bytes (which is all that is needed + // from the 64 byte key anyway) guard cX25519Pubkey.count == 32, - cX25519Seckey.count == 64, + (cX25519Seckey.count == 32 || cX25519Seckey.count == 64), session_decrypt_incoming_legacy_group( &cCiphertext, cCiphertext.count, diff --git a/SessionUtilitiesKit/Crypto/Crypto+SessionUtilitiesKit.swift b/SessionUtilitiesKit/Crypto/Crypto+SessionUtilitiesKit.swift index 30b71d17d..d1ceed919 100644 --- a/SessionUtilitiesKit/Crypto/Crypto+SessionUtilitiesKit.swift +++ b/SessionUtilitiesKit/Crypto/Crypto+SessionUtilitiesKit.swift @@ -55,7 +55,7 @@ public extension Crypto.Generator { static func x25519KeyPair() -> Crypto.Generator { return Crypto.Generator(id: "x25519KeyPair") { () -> KeyPair in var pubkey: [UInt8] = [UInt8](repeating: 0, count: 32) - var seckey: [UInt8] = [UInt8](repeating: 0, count: 64) + var seckey: [UInt8] = [UInt8](repeating: 0, count: 32) guard session_curve25519_key_pair(&pubkey, &seckey) else { throw CryptoError.keyGenerationFailed }