From 2d32435a977418443cb498c15f1283fd9111b424 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 21 Jun 2018 12:38:04 -0400 Subject: Bug 1393146 - Automate blocking IPs that bugzilla flags as exceeding rate limits --- Bugzilla.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 427dd3aea..ad8019a99 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -862,7 +862,10 @@ sub check_rate_limit { } my $limit = join("/", @$limit); Bugzilla->audit("[rate_limit] action=$action, ip=$ip, limit=$limit, name=$name"); - ThrowUserError("rate_limit") if $action eq 'block'; + if ($action eq 'block') { + Bugzilla::ModPerl::BlockIP->block_ip($ip); + ThrowUserError("rate_limit"); + } } } } -- cgit v1.2.3-24-g4f1b