소스 검색

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;