mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: FTP - send password in server encoding
This commit is contained in:
parent
ce935f535c
commit
b1af4e2490
3 changed files with 10 additions and 4 deletions
|
|
@ -21,8 +21,8 @@
|
|||
<VersionInfo>
|
||||
<UseVersionInfo Value="True"/>
|
||||
<MinorVersionNr Value="3"/>
|
||||
<RevisionNr Value="2"/>
|
||||
<StringTable FileDescription="FTP WFX plugin for Double Commander" LegalCopyright="Copyright (C) 2006-2017 Alexander Koblov"/>
|
||||
<RevisionNr Value="3"/>
|
||||
<StringTable FileDescription="FTP WFX plugin for Double Commander" LegalCopyright="Copyright (C) 2006-2019 Alexander Koblov"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Release" Default="True"/>
|
||||
|
|
|
|||
|
|
@ -106,8 +106,9 @@ type
|
|||
procedure DoStatus(Response: Boolean; const Value: string); override;
|
||||
procedure OnSocketStatus(Sender: TObject; Reason: THookSocketReason; const Value: String);
|
||||
public
|
||||
function ClientToServer(const Value: UnicodeString): AnsiString;
|
||||
function ServerToClient(const Value: AnsiString): UnicodeString;
|
||||
function ClientToServer(const Value: AnsiString): AnsiString; overload;
|
||||
function ClientToServer(const Value: UnicodeString): AnsiString; overload;
|
||||
public
|
||||
function FsFindFirstW(const Path: String; var FindData: TWin32FindDataW): Pointer; virtual;
|
||||
function FsFindNextW(Handle: Pointer; var FindData: TWin32FindDataW): BOOL; virtual;
|
||||
|
|
@ -558,6 +559,11 @@ begin
|
|||
LogProc(PluginNumber, msgtype_importanterror, PWideChar(ServerToClient(Value)));
|
||||
end;
|
||||
|
||||
function TFTPSendEx.ClientToServer(const Value: AnsiString): AnsiString;
|
||||
begin
|
||||
Result:= ConvertFromUtf8(Value);
|
||||
end;
|
||||
|
||||
function TFTPSendEx.ClientToServer(const Value: UnicodeString): AnsiString;
|
||||
begin
|
||||
Result:= ConvertFromUtf8(UTF16ToUTF8(Value));
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ begin
|
|||
Exit;
|
||||
end;
|
||||
end;
|
||||
FtpSend.Password := Connection.Password;
|
||||
FtpSend.Password := FtpSend.ClientToServer(Connection.Password);
|
||||
SetProxy(FtpSend, Connection.Proxy);
|
||||
// try to connect
|
||||
if FtpLogin(Connection, FtpSend) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue