diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/protocols/http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index b34206271..8b65ece50 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -464,8 +464,8 @@ static void ndpi_check_user_agent(struct ndpi_detection_module_struct *ndpi_stru */ if((strstr(ua, "+http") != NULL) || (strstr(ua, " http") != NULL) - || strcasestr(ua, "Crawler") - || strcasestr(ua, "Bot") /* bot/robot */ + || ndpi_strncasestr(ua, "Crawler", strlen(ua)) + || ndpi_strncasestr(ua, "Bot", strlen(ua)) /* bot/robot */ ) { ndpi_set_risk(ndpi_struct, flow, NDPI_HTTP_CRAWLER_BOT); } |