From 09fad61a531bc1b5993856d6efb52035a0fcfe08 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 23 Mar 2023 20:45:12 +0000 Subject: [PATCH] Reject no user agent --- crawlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawlers.py b/crawlers.py index 841b19e73..5df7f2b63 100644 --- a/crawlers.py +++ b/crawlers.py @@ -110,7 +110,7 @@ def blocked_user_agent(calling_domain: str, agent_str: str, """Should a GET or POST be blocked based upon its user agent? """ if not agent_str: - return False, blocked_cache_last_updated + return True, blocked_cache_last_updated agent_str_lower = agent_str.lower() for ua_block in default_user_agent_blocks: