From 7b338f152db74f306faca7c33b90d3027ba6be9c Mon Sep 17 00:00:00 2001 From: cory marsh Date: Tue, 19 Jan 2021 01:48:31 -0700 Subject: [PATCH] don't always report browser challenges as alerts' --- botfilter.php | 3 +-- config.ini | 2 +- config.ini.php | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/botfilter.php b/botfilter.php index 8ab6860..947a991 100644 --- a/botfilter.php +++ b/botfilter.php @@ -483,8 +483,7 @@ function require_browser_or_die(array $request, \TF\Maybe $cookie) { \TF\CacheStorage::get_instance()->update_data(CACHE_NAME_JS_SEND, function($ctr) { return $ctr + 1; }, 0, \TF\DAY * 30); http_response_code(202); - $block = new \BitFire\Block(1, 'n/a', 'n/a', 'check JS/Cookies', 0); - \BitFire\reporting($block, $request); + $block = BitFire::new_block(1, 'n/a', 'n/a', 'check JS/Cookies', 0); echo make_js_challenge($request[REQUEST_IP], Config::str(CONFIG_USER_TRACK_PARAM), Config::str(CONFIG_ENCRYPT_KEY), Config::str(CONFIG_USER_TRACK_COOKIE)) . "\n"; diff --git a/config.ini b/config.ini index dbb9451..c5e6051 100644 --- a/config.ini +++ b/config.ini @@ -148,7 +148,7 @@ whitelist_enable = report blacklist_enable = true ; if true, only browsers that accept cookies and run javascript will be allowed to connect -require_full_browser = false +require_full_browser = report ; set the honeypot url configuration honeypot_url = '/ztcegizz/contact' diff --git a/config.ini.php b/config.ini.php index 3927f1b..9bb8d36 100644 --- a/config.ini.php +++ b/config.ini.php @@ -78,9 +78,9 @@ 3 => 'PUT', 4 => 'HEAD', ), - 'whitelist_enable' => 'report', + 'whitelist_enable' => 'block', 'blacklist_enable' => true, - 'require_full_browser' => false, + 'require_full_browser' => 'report', 'honeypot_url' => '/ztcegizz/contact', 'check_domain' => false, 'valid_domains' =>