diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-06-21 18:38:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-21 18:38:04 +0200 |
commit | 2d32435a977418443cb498c15f1283fd9111b424 (patch) | |
tree | 4d630f214f3715081da6063902c53d88fe98e5e8 | |
parent | 1024d9b797217682cba6d89e484620782a7bb327 (diff) | |
download | bugzilla-2d32435a977418443cb498c15f1283fd9111b424.tar.gz bugzilla-2d32435a977418443cb498c15f1283fd9111b424.tar.xz |
Bug 1393146 - Automate blocking IPs that bugzilla flags as exceeding rate limits
-rw-r--r-- | Bugzilla.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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"); + } } } } |