summaryrefslogtreecommitdiffstats
path: root/show_bug.cgi
diff options
context:
space:
mode:
authorMary Umoh <umohm12@gmail.com>2017-06-30 01:03:46 +0200
committerDylan William Hardison <dylan@hardison.net>2017-07-07 00:19:20 +0200
commit4c9f9a8c49e9f25096ee3b6982b197e9efa6dd60 (patch)
tree21fd41e87f0838321f4494f784fd94bc1f1b679f /show_bug.cgi
parent662b0801c0e429b7d83c2ad6ed47a0293f10ff5e (diff)
downloadbugzilla-4c9f9a8c49e9f25096ee3b6982b197e9efa6dd60.tar.gz
bugzilla-4c9f9a8c49e9f25096ee3b6982b197e9efa6dd60.tar.xz
Bug 1355169 - Add rate-limiting to show_bug.cgi and rest.cgi
* fix mistake * Update * Updates * remove other file
Diffstat (limited to 'show_bug.cgi')
-rwxr-xr-xshow_bug.cgi6
1 files changed, 5 insertions, 1 deletions
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'),