From 4c9f9a8c49e9f25096ee3b6982b197e9efa6dd60 Mon Sep 17 00:00:00 2001 From: Mary Umoh Date: Thu, 29 Jun 2017 16:03:46 -0700 Subject: Bug 1355169 - Add rate-limiting to show_bug.cgi and rest.cgi * fix mistake * Update * Updates * remove other file --- show_bug.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'show_bug.cgi') diff --git a/show_bug.cgi b/show_bug.cgi index d2695a66f..172394781 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -20,7 +20,7 @@ use Bugzilla::Keyword; use Bugzilla::Bug; use Bugzilla::Hook; use Bugzilla::CGI; -use Bugzilla::Util qw(detaint_natural); +use Bugzilla::Util qw(detaint_natural remote_ip); my $cgi = Bugzilla->cgi; my $template = Bugzilla->template; @@ -28,6 +28,10 @@ my $vars = {}; my $user = Bugzilla->login(); +unless ($user->id) { + Bugzilla->check_rate_limit("show_bug", remote_ip()); +} + # BMO: add show_bug_format for experimental UI work my $format_params = { format => scalar $cgi->param('format'), -- cgit v1.2.3-24-g4f1b