浏览代码

Bug 1387: Failure when connecting using FTP with empty password

https://winscp.net/tracker/1387

Source commit: 3086b24628b79ea2b643e9a0b29512055fb9fcd6
Martin Prikryl 9 年之前
父节点
当前提交
808bd4d9f3
共有 1 个文件被更改,包括 3 次插入1 次删除
  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());
       Data.Password = _wcsdup(Password.c_str());
     }
     }