extend rate limiter
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/../../classes/BotLogger.php';
|
||||
require_once dirname(__FILE__) . '/../../classes/RuleManager.php';
|
||||
|
||||
class BotLimiterVerifyModuleFrontController extends ModuleFrontController
|
||||
{
|
||||
public function initContent()
|
||||
{
|
||||
$ip = BotLogger::getRealIp();
|
||||
|
||||
// If they hit the verify page itself more than 5 times in 30 seconds
|
||||
if (RateLimiter::checkIsRateLimited($ip, 'verify_page_load', 5, 30)) {
|
||||
BotLogger::logBan($ip, 'VERIFY_PAGE_FLOOD');
|
||||
header('HTTP/1.1 429 Too Many Requests');
|
||||
die('Too many verification attempts.');
|
||||
}
|
||||
|
||||
parent::initContent(); // This initializes the Standard PS Cookie
|
||||
|
||||
$ip = BotLogger::getRealIp();
|
||||
|
||||
Reference in New Issue
Block a user