Selaa lähdekoodia

Bug 1387: Failure when connecting using FTP with empty password

https://winscp.net/tracker/1387

Source commit: 3086b24628b79ea2b643e9a0b29512055fb9fcd6
Martin Prikryl 9 vuotta sitten
vanhempi
sitoutus
808bd4d9f3
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      source/core/FtpFileSystem.cpp

+ 3 - 1
source/core/FtpFileSystem.cpp

@@ -4337,7 +4337,9 @@ bool __fastcall TFTPFileSystem::HandleAsynchRequestNeedPass(
       }
     }
 
-    if (!Password.IsEmpty())
+    // When returning REPLY_OK, we need to return an allocated password,
+    // even if we were returning and empty string we got on input.
+    if (RequestResult == TFileZillaIntf::REPLY_OK)
     {
       Data.Password = _wcsdup(Password.c_str());
     }