Browse Source

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
28986507eb
3 changed files with 3 additions and 6 deletions
  1. 1 1
      iOSClient/NCGlobal.swift
  2. 1 1
      iOSClient/Settings/NCSettings.m
  3. 1 4
      iOSClient/Utility/CCUtility.m

+ 1 - 1
iOSClient/NCGlobal.swift

@@ -127,7 +127,7 @@ class NCGlobal: NSObject {
     //
     let e2eeMaxFileSize: UInt64                     = 500000000     // 500 MB
     let e2eePassphraseTest                          = "more over television factory tendency independence international intellectual impress interest sentence pony"
-    @objc let e2eeVersion                           = "2"
+    @objc let e2eeVersion                           = ["1.1", "1.2", "2"]
 
     // Video
     //

+ 1 - 1
iOSClient/Settings/NCSettings.m

@@ -120,7 +120,7 @@
     BOOL isE2EEEnabled = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesE2EEEnabled exists:false];
     NSString *versionE2EE = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesE2EEApiVersion];
 
-    if (isE2EEEnabled == YES && [versionE2EE isEqual:[[NCGlobal shared] e2eeVersion]]) {
+    if (isE2EEEnabled == YES && [NCGlobal.shared.e2eeVersion containsObject:versionE2EE]) {
 
         section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_e2e_settings_title_", nil)];
         [form addFormSection:section];

+ 1 - 4
iOSClient/Utility/CCUtility.m

@@ -372,12 +372,9 @@
     NSString *privateKey = [self getEndToEndPrivateKey:account];
     NSString *passphrase = [self getEndToEndPassphrase:account];
             
-    if (passphrase.length > 0 && privateKey.length > 0 && certificate.length > 0 && publicKey.length > 0 && isE2EEEnabled && [versionE2EE isEqual:[[NCGlobal shared] e2eeVersion]]) {
-       
+    if (passphrase.length > 0 && privateKey.length > 0 && certificate.length > 0 && publicKey.length > 0 && isE2EEEnabled && [NCGlobal.shared.e2eeVersion containsObject:versionE2EE]) {
         return YES;
-        
     } else {
-        
         return NO;
     }
 }