From 4543385d107fcc5a7e8632e35d9a60bcc40cb4f4 Mon Sep 17 00:00:00 2001 From: Vitaly Lavrov Date: Mon, 5 Feb 2024 21:44:45 +0300 Subject: Normalization of host_server_name (#2299) * Normalization of host_server_name The ndpi_hostname_sni_set() function replaces all non-printable characters with the "?" character and removing whitespace characters at the end of the line. * Added conditional hostname normalization. --- src/lib/protocols/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/protocols/http.c') diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index dd0508050..2516f8158 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -950,7 +950,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ packet->host_line.len, packet->host_line.ptr); /* Copy result for nDPI apps */ - ndpi_hostname_sni_set(flow, packet->host_line.ptr, packet->host_line.len); + ndpi_hostname_sni_set(flow, packet->host_line.ptr, packet->host_line.len, NDPI_HOSTNAME_NORM_ALL); if(strlen(flow->host_server_name) > 0) { char *double_col; -- cgit v1.2.3