From e6164536e8b897a6c5041bb4a555079171529848 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 29 Apr 2019 22:21:42 +0200 Subject: [PATCH] The "good bots" lists had been unified. --- blockbot/blockbot.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index 30f0b73c..9e590a99 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -34,25 +34,16 @@ function blockbot_init_1(App $a) { return; } - // List of strings of reported false positives - $agents = ['hackney/', 'Faraday v', 'okhttp', 'UniversalFeedParser', 'PixelFedBot', 'python-requests', - 'WordPress/', 'http.rb/']; - foreach ($agents as $agent) { - if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) { - // The agents had been reported to https://github.com/JayBizzle/Crawler-Detect/issues/ - logger::notice('Reported false positive', $logdata); - return; - } - } - - // List of false positives' strings of known "good" agents we haven't reported (yet) + // List of false positives' strings of known "good" agents. $agents = ['fediverse.network crawler', 'Active_Pods_CheckBot_3.0', 'Social-Relay/', 'curl', 'zgrab', 'Go-http-client', 'curb', 'github.com', 'reqwest', 'Feedly/', - 'Python-urllib/', 'Liferea/', 'aiohttp/', 'WordPress.com Reader']; + 'Python-urllib/', 'Liferea/', 'aiohttp/', 'WordPress.com Reader', 'hackney/', + 'Faraday v', 'okhttp', 'UniversalFeedParser', 'PixelFedBot', 'python-requests', + 'WordPress/', 'http.rb/']; foreach ($agents as $agent) { if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) { - logger::notice('Unreported falsely detected agent', $logdata); + logger::notice('False positive', $logdata); return; } }