1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Bug 958: Local ports for active FTP mode can be limited

https://winscp.net/tracker/958
(cherry picked from commit a00bcd5188)

Source commit: 1c1245fcc1a0939a34931061e926889f8e14cecb
This commit is contained in:
Martin Prikryl
2020-10-14 14:44:52 +00:00
parent babcc792aa
commit bd8d7041c0
10 changed files with 146 additions and 20 deletions

View File

@@ -2667,14 +2667,15 @@ int __fastcall TFTPFileSystem::GetOptionVal(int OptionID) const
break;
case OPTION_LIMITPORTRANGE:
Result = FALSE;
Result = !FTerminal->SessionData->FtpPasvMode && FTerminal->Configuration->HasLocalPortNumberLimits();
break;
case OPTION_PORTRANGELOW:
Result = FTerminal->Configuration->LocalPortNumberMin;
break;
case OPTION_PORTRANGEHIGH:
// should never get here OPTION_LIMITPORTRANGE being zero
DebugFail();
Result = 0;
Result = FTerminal->Configuration->LocalPortNumberMax;
break;
case OPTION_ENABLE_IPV6: