fix bugs with bot request counter bleeeeeeerh

This commit is contained in:
2026-10-10 17:22:49 -04:00
parent 8e0d2ca264
commit bfca82f4e3
+3 -1
View File
@@ -44,6 +44,8 @@ class bot_protection{
if($counter > config::RATELIMIT_BURST){ if($counter > config::RATELIMIT_BURST){
apcu_inc(intdiv(time(), 3600) . ".bot_requests", 1, $s, 262800);
if($output === false){ if($output === false){
http_response_code(429); http_response_code(429);
@@ -259,7 +261,7 @@ class bot_protection{
} }
} }
apcu_inc(intdiv(time(), 3600) . ".bot_requests", 1, $s, 259200); apcu_inc(intdiv(time(), 3600) . ".bot_requests", 1, $s, 262800);
$key = "c" . apcu_inc("captcha_gen", 1) . "." . $this->randomchars(); $key = "c" . apcu_inc("captcha_gen", 1) . "." . $this->randomchars();
$payload = [ $payload = [