From 017c1a42394501914f850fd54411884545105879 Mon Sep 17 00:00:00 2001 From: Nardi Ivan Date: Tue, 21 Sep 2021 17:56:31 +0200 Subject: FTP: fix support for START-TLS sessions When TLS-over-FTP is used, the credentials are encrypted. So we must not wait for the username and the password commands, otherwise we elaborate a lot of packets for nothing. --- src/lib/ndpi_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 4776095ef..cc1db9ccb 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -7242,7 +7242,8 @@ u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndp case NDPI_PROTOCOL_MAIL_POP: case NDPI_PROTOCOL_MAIL_IMAP: case NDPI_PROTOCOL_MAIL_SMTP: - if(flow->protos.ftp_imap_pop_smtp.password[0] == '\0') + if(flow->protos.ftp_imap_pop_smtp.password[0] == '\0' && + flow->protos.ftp_imap_pop_smtp.auth_tls == 0) return(1); break; -- cgit v1.2.3