summaryrefslogtreecommitdiffstats
path: root/template/en/default
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 /template/en/default
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 'template/en/default')
-rw-r--r--template/en/default/admin/params/admin.html.tmpl11
-rw-r--r--template/en/default/global/user-error.html.tmpl4
2 files changed, 15 insertions, 0 deletions
diff --git a/template/en/default/admin/params/admin.html.tmpl b/template/en/default/admin/params/admin.html.tmpl
index df0580783..ee19418c7 100644
--- a/template/en/default/admin/params/admin.html.tmpl
+++ b/template/en/default/admin/params/admin.html.tmpl
@@ -23,6 +23,13 @@
desc = "Set up account policies"
%]
+[% rate_limit_rules_desc = BLOCK %]
+This parameter is a json object. It has one or more valid keys, whose values are each of an array [MAX_RATE, SECONDS]. MAX_RATE is the maximum
+number of requests that can occur over SECONDS. The default is [75, 60] or 75 requests
+over 60 seconds. Valid keys are <code>get_b[%''%]ug</code> which covers JSONRPC, XMLRPC, REST and BZAPI single
+[% terms.bug %] access methods, and <code>show_b[%''%]ug</code> which controls show [% terms.bug %]
+[% END %]
+
[% param_descs = {
allowbugdeletion => "The pages to edit products and components can delete all " _
"associated $terms.bugs when you delete a product (or component). " _
@@ -42,5 +49,9 @@
last_visit_keep_days => "This option controls how many days $terms.Bugzilla will " _
"remember when users visit specific ${terms.bugs}.",
+ rate_limit_active => "Allow some types of requests to be rate limited."
+
+ rate_limit_rules => rate_limit_rules_desc
+
log_user_requests => "This option controls logging of authenticated requests in the user_request_log table"}
%]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 29408e193..9d241ea71 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1812,6 +1812,10 @@
The token you submitted does not exist, has expired, or has
been canceled.
+ [% ELSIF error == "rate_limit" %]
+ [% title = "Rate Limit Exceeded" %]
+ You have exceeded the rate limit.
+
[% ELSIF error == "too_soon_for_new_token" %]
[% title = "Too Soon For New Token" %]
You have requested