Skip to content

Commit

Permalink
don't always report browser challenges as alerts'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitslip6 committed Jan 19, 2021
1 parent a6d0d1c commit 7b338f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions botfilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions config.ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' =>
Expand Down

0 comments on commit 7b338f1

Please sign in to comment.