mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
This commit is contained in:
@@ -2361,6 +2361,10 @@ void __fastcall TSCPFileSystem::SCPSink(const UnicodeString TargetDir,
|
||||
{
|
||||
FTerminal->LogEvent(FORMAT(L"Warning: Remote host set a compound pathname '%s'", (Line)));
|
||||
}
|
||||
if ((Level == 0) && (OnlyFileName != UnixExtractFileName(FileName)))
|
||||
{
|
||||
SCPError(LoadStr(UNREQUESTED_FILE), False);
|
||||
}
|
||||
|
||||
FullFileName = SourceDir + OnlyFileName;
|
||||
OperationProgress->SetFile(FullFileName);
|
||||
|
||||
Reference in New Issue
Block a user