Browse Source

Bug 1498: Remembered password is not used for reconnects

https://winscp.net/tracker/1498
(cherry picked from commit a5e1e1b72d0b16b8ce0f337cd6884b61797d31cd)

Source commit: eb4193671cc09d328865165696b632d3b2556ff8
Martin Prikryl 8 years ago
parent
commit
94319bb343
1 changed files with 4 additions and 4 deletions
  1. 4 4
      source/core/Terminal.cpp

+ 4 - 4
source/core/Terminal.cpp

@@ -836,11 +836,7 @@ void __fastcall TTerminal::ResetConnection()
   FTunnelError = L"";
 
   FRememberedPasswordTried = false;
-  // Particularly to prevent reusing a wrong client certificate passphrase
-  // from a previous login attempt
-  FRememberedPassword = UnicodeString();
   FRememberedTunnelPasswordTried = false;
-  FRememberedTunnelPassword = UnicodeString();
 
   if (FDirectoryChangesCache != NULL)
   {
@@ -1044,6 +1040,10 @@ void __fastcall TTerminal::Open()
         {
           FFingerprintScanned = FFileSystem->GetSessionInfo().CertificateFingerprint;
         }
+        // Particularly to prevent reusing a wrong client certificate passphrase
+        // in the next login attempt
+        FRememberedPassword = UnicodeString();
+        FRememberedTunnelPassword = UnicodeString();
         throw;
       }
     }