Browse Source

fix checkTrustedChallenge [rollback] + host

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 years ago
parent
commit
c728c432ce
1 changed files with 4 additions and 0 deletions
  1. 4 0
      iOSClient/AppDelegate.swift

+ 4 - 0
iOSClient/AppDelegate.swift

@@ -569,17 +569,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
             let alertController = UIAlertController(title: title, message: NSLocalizedString("_server_is_trusted_", comment: ""), preferredStyle: .alert)
             
             alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_", comment: ""), style: .default, handler: { action in
+                
                 if NCNetworking.shared.certificatesError.contains(currentHost) {
                     NCNetworking.shared.writeCertificate(host: currentHost)
                 }
                 if NCNetworking.shared.certificatesError.contains(pushNotificationServerProxyHost) {
                     NCNetworking.shared.writeCertificate(host: pushNotificationServerProxyHost)
                 }
+                
                 NCNetworking.shared.certificatesError.removeAll()
                 self.startTimerErrorNetworking()
             }))
             
             alertController.addAction(UIAlertAction(title: NSLocalizedString("_no_", comment: ""), style: .default, handler: { action in
+                
+                NCNetworking.shared.certificatesError.removeAll()
                 self.startTimerErrorNetworking()
             }))