Pārlūkot izejas kodu

Logging when SFTP server returns higher version than asked for

Source commit: 9dd6c76d1274199ab3e21c02b5f38946d7496eb7
Martin Prikryl 4 gadi atpakaļ
vecāks
revīzija
b2465d9bc5
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      source/core/SftpFileSystem.cpp

+ 6 - 0
source/core/SftpFileSystem.cpp

@@ -2986,6 +2986,12 @@ void __fastcall TSFTPFileSystem::DoStartup()
 
   FVersion = Packet.GetCardinal();
   FTerminal->LogEvent(FORMAT(L"SFTP version %d negotiated.", (FVersion)));
+  if (FVersion > MaxVersion)
+  {
+    // This happens with ProFTPD:
+    // https://github.com/proftpd/proftpd/issues/1200
+    FTerminal->LogEvent(L"Got higher version than asked for.");
+  }
   if (FVersion < SFTPMinVersion || FVersion > SFTPMaxVersion)
   {
     FTerminal->FatalError(NULL, FMTLOAD(SFTP_VERSION_NOT_SUPPORTED,