Преглед изворни кода

Fix SshAuthenticationException by handling PartialSuccess response and continue authentication proccess in that case

olegkap_cp пре 12 година
родитељ
комит
908c22cc93
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Renci.SshClient/Renci.SshNet/ConnectionInfo.cs

+ 1 - 1
Renci.SshClient/Renci.SshNet/ConnectionInfo.cs

@@ -419,7 +419,7 @@ namespace Renci.SshNet
 
                 authenticated = method.Authenticate(session);
 
-                if (authenticated == AuthenticationResult.PartialSuccess)
+                if (authenticated == AuthenticationResult.PartialSuccess || (method.AllowedAuthentications != null && method.AllowedAuthentications.Count() < allowedAuthentications.Count()))
                 {
                     // If further authentication is required then continue to try another method
                     allowedAuthentications = method.AllowedAuthentications;