From 31e69774248baba96798982cb03d445c5c61ba4b Mon Sep 17 00:00:00 2001 From: "Shilpa Nagpal (shinagpa)" Date: Fri, 5 Sep 2025 10:23:40 +0000 Subject: [PATCH] Pull request #4882: file_api: Block Archive file during FTPS transfer Merge in SNORT/snort3 from ~SHINAGPA/snort3:file_ftps_fix to master Squashed commit of the following: commit 2665b8645cc3a2ddbaedff10cb0b00a8f5e3e49d Author: Shilpa Nagpal Date: Tue Aug 26 15:07:35 2025 +0530 file_api: set file size when file size is middle and data flushed --- src/file_api/file_lib.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/file_api/file_lib.cc b/src/file_api/file_lib.cc index 127cd2a4c..438c99736 100644 --- a/src/file_api/file_lib.cc +++ b/src/file_api/file_lib.cc @@ -1044,6 +1044,10 @@ void FileContext::update_file_size(int data_size, FilePosition position) processed_bytes = 0; processing_complete = true; } + else if ((position == SNORT_FILE_MIDDLE) and sha256) + { + file_size = processed_bytes; + } } uint64_t FileContext::get_processed_bytes() -- 2.47.3