summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-11-26 01:08:58 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2011-11-26 01:08:58 +0100
commitc9aaffd4541554af069e4ac097c39f567b02f55a (patch)
tree13498d0860a3d4616f26d5f56e767f382678c682 /Bugzilla
parent92cb17e05cecb4093ee9e189347ba66b8844528a (diff)
downloadbugzilla-c9aaffd4541554af069e4ac097c39f567b02f55a.tar.gz
bugzilla-c9aaffd4541554af069e4ac097c39f567b02f55a.tar.xz
Bug 255606: Do not let buglist.cgi return all bugs by default
r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Config.pm5
-rw-r--r--Bugzilla/Config/Query.pm2
-rw-r--r--Bugzilla/Search.pm5
3 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index c247a072a..990fd8dd2 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -193,6 +193,11 @@ sub update_params {
$new_params{'ssl_redirect'} = 1;
}
+ # "specific_search_allow_empty_words" has been renamed to "search_allow_no_criteria".
+ if (exists $param->{'specific_search_allow_empty_words'}) {
+ $new_params{'search_allow_no_criteria'} = $param->{'specific_search_allow_empty_words'};
+ }
+
# --- DEFAULTS FOR NEW PARAMS ---
_load_params unless %params;
diff --git a/Bugzilla/Config/Query.pm b/Bugzilla/Config/Query.pm
index 17a74998e..4038c13ef 100644
--- a/Bugzilla/Config/Query.pm
+++ b/Bugzilla/Config/Query.pm
@@ -68,7 +68,7 @@ sub get_param_list {
},
{
- name => 'specific_search_allow_empty_words',
+ name => 'search_allow_no_criteria',
type => 'b',
default => 1
},
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index d47e0ae99..6bbf4ab42 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -1168,6 +1168,11 @@ sub _sql_where {
if ($clause_sql) {
$where .= "\n AND " . $clause_sql;
}
+ elsif (!Bugzilla->params->{'search_allow_no_criteria'}
+ && !$self->{allow_unlimited})
+ {
+ ThrowUserError('buglist_parameters_required');
+ }
return $where;
}