Prechádzať zdrojové kódy

CustomDialogRendererHandler: Disable SMBv1 dialog

This disables the overall SMBv1/SMBv2 dialog logic introduced by
a5476b4f247944dfb115e65cdca3d6521d87bf88.

Indeed, due to a keystore issue the user will be asked/spammed everytime
for a SMB version confirmation.

This SMBv1 dialog need a permanent keystore to remember the user choice.
Sadly, we can't really add the keychain keystore until a major network
browsing rework.

Some functionalities are missing like the ability to edit/remove keystore entries.
Soomin Lee 5 rokov pred
rodič
commit
981f144642
1 zmenil súbory, kde vykonal 26 pridanie a 19 odobranie
  1. 26 19
      SharedSources/CustomDialogRendererHandler.swift

+ 26 - 19
SharedSources/CustomDialogRendererHandler.swift

@@ -153,26 +153,33 @@ extension CustomDialogRendererHandler: VLCCustomDialogRendererProtocol {
     func showLogin(withTitle title: String, message: String,
                    defaultUsername username: String?, askingForStorage: Bool,
                    withReference reference: NSValue) {
-        if !title.contains("SMBv1") || selectedSMBv1 {
-            handleLoginAlert(with: title, message: message,
-                             username: username,
-                             askingForStorage: askingForStorage,
-                             withReference: reference)
-            return
-        }
 
-        handleSMBv1() {
-            [weak self] isSMBv1 in
-            if isSMBv1 {
-                self?.selectedSMBv1 = true
-                self?.handleLoginAlert(with: title, message: message,
-                                       username: username,
-                                       askingForStorage: askingForStorage,
-                                       withReference: reference)
-            } else {
-                self?.dialogProvider.dismissDialog(withReference: reference)
-            }
-        }
+        // Due to a keystore issue, we disable the overall SMBv1 dialog logic and direcly show the login
+        handleLoginAlert(with: title, message: message,
+                         username: username,
+                         askingForStorage: false,
+                         withReference: reference)
+
+        //  if !title.contains("SMBv1") || selectedSMBv1 {
+        //      handleLoginAlert(with: title, message: message,
+        //                       username: username,
+        //                       askingForStorage: askingForStorage,
+        //                       withReference: reference)
+        //      return
+        //  }
+
+        //  handleSMBv1() {
+        //      [weak self] isSMBv1 in
+        //      if isSMBv1 {
+        //          self?.selectedSMBv1 = true
+        //          self?.handleLoginAlert(with: title, message: message,
+        //                                 username: username,
+        //                                 askingForStorage: askingForStorage,
+        //                                 withReference: reference)
+        //      } else {
+        //          self?.dialogProvider.dismissDialog(withReference: reference)
+        //      }
+        //  }
 }
 
     func showQuestion(withTitle title: String, message: String,