summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-01-27 04:47:42 +0100
committerByron Jones <glob@mozilla.com>2015-01-27 04:47:42 +0100
commita748745d3eb9110b0c6bcd803d8d86db8951ad43 (patch)
treeca477a3af19b85db7c546bace4ce9e93186a3b21 /extensions
parentcd92366e1a3a89228917140e9c2f8747a17509b3 (diff)
downloadbugzilla-a748745d3eb9110b0c6bcd803d8d86db8951ad43.tar.gz
bugzilla-a748745d3eb9110b0c6bcd803d8d86db8951ad43.tar.xz
Bug 1124437: Backport upstream bug 1090275 to bmo/4.2 to whitelist webservice api methods
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/lib/WebService.pm5
-rw-r--r--extensions/Bitly/lib/WebService.pm5
-rw-r--r--extensions/EditComments/lib/WebService.pm4
-rw-r--r--extensions/Ember/lib/WebService.pm8
-rw-r--r--extensions/Example/lib/WebService.pm5
-rw-r--r--extensions/MyDashboard/lib/WebService.pm7
-rw-r--r--extensions/ProdCompSearch/lib/WebService.pm4
-rw-r--r--extensions/Review/lib/WebService.pm7
8 files changed, 44 insertions, 1 deletions
diff --git a/extensions/BMO/lib/WebService.pm b/extensions/BMO/lib/WebService.pm
index ed94aabfc..d31811de4 100644
--- a/extensions/BMO/lib/WebService.pm
+++ b/extensions/BMO/lib/WebService.pm
@@ -30,6 +30,11 @@ use Bugzilla::Util qw(detaint_natural trick_taint);
use Bugzilla::WebService::Util qw(validate);
use Bugzilla::Field;
+use constant PUBLIC_METHODS => qw(
+ getBugsConfirmer
+ getBugsVerifier
+);
+
sub getBugsConfirmer {
my ($self, $params) = validate(@_, 'names');
my $dbh = Bugzilla->dbh;
diff --git a/extensions/Bitly/lib/WebService.pm b/extensions/Bitly/lib/WebService.pm
index e721103b0..b47accda6 100644
--- a/extensions/Bitly/lib/WebService.pm
+++ b/extensions/Bitly/lib/WebService.pm
@@ -25,6 +25,11 @@ use URI;
use URI::Escape;
use URI::QueryParam;
+use constant PUBLIC_METHODS => qw(
+ list
+ shorten
+);
+
sub _validate_uri {
my ($self, $params) = @_;
diff --git a/extensions/EditComments/lib/WebService.pm b/extensions/EditComments/lib/WebService.pm
index 9213f0407..2621e5f4a 100644
--- a/extensions/EditComments/lib/WebService.pm
+++ b/extensions/EditComments/lib/WebService.pm
@@ -16,6 +16,10 @@ use Bugzilla::Error;
use Bugzilla::Util qw(trim);
use Bugzilla::WebService::Util qw(validate);
+use constant PUBLIC_METHODS => qw(
+ comments
+);
+
sub comments {
my ($self, $params) = validate(@_, 'comment_ids');
my $dbh = Bugzilla->switch_to_shadow_db();
diff --git a/extensions/Ember/lib/WebService.pm b/extensions/Ember/lib/WebService.pm
index 7a037e654..10c828537 100644
--- a/extensions/Ember/lib/WebService.pm
+++ b/extensions/Ember/lib/WebService.pm
@@ -28,6 +28,14 @@ use Bugzilla::Extension::Ember::FakeBug;
use Scalar::Util qw(blessed);
use Storable qw(dclone);
+use constant PUBLIC_METHODS => qw(
+ bug
+ create
+ get_attachments
+ search
+ show
+);
+
use constant DATE_FIELDS => {
show => ['last_updated'],
};
diff --git a/extensions/Example/lib/WebService.pm b/extensions/Example/lib/WebService.pm
index 8563ec7f0..bb83436e3 100644
--- a/extensions/Example/lib/WebService.pm
+++ b/extensions/Example/lib/WebService.pm
@@ -24,6 +24,11 @@ use warnings;
use base qw(Bugzilla::WebService);
use Bugzilla::Error;
+use constant PUBLIC_METHODS => qw(
+ hello
+ throw_an_error
+);
+
# This can be called as Example.hello() from the WebService.
sub hello { return 'Hello!'; }
diff --git a/extensions/MyDashboard/lib/WebService.pm b/extensions/MyDashboard/lib/WebService.pm
index 9e9de42be..c93553146 100644
--- a/extensions/MyDashboard/lib/WebService.pm
+++ b/extensions/MyDashboard/lib/WebService.pm
@@ -24,6 +24,13 @@ use constant READ_ONLY => qw(
run_flag_query
);
+use constant PUBLIC_METHODS => qw(
+ bug_interest_unmark
+ run_bug_query
+ run_flag_query
+ run_last_changes
+);
+
sub run_last_changes {
my ($self, $params) = @_;
diff --git a/extensions/ProdCompSearch/lib/WebService.pm b/extensions/ProdCompSearch/lib/WebService.pm
index d668809f6..b9a03eb27 100644
--- a/extensions/ProdCompSearch/lib/WebService.pm
+++ b/extensions/ProdCompSearch/lib/WebService.pm
@@ -15,6 +15,10 @@ use base qw(Bugzilla::WebService);
use Bugzilla::Error;
use Bugzilla::Util qw(detaint_natural trick_taint trim);
+use constant PUBLIC_METHODS => qw(
+ prod_comp_search
+);
+
sub prod_comp_search {
my ($self, $params) = @_;
my $user = Bugzilla->user;
diff --git a/extensions/Review/lib/WebService.pm b/extensions/Review/lib/WebService.pm
index d16ab3dd8..24d38b2f1 100644
--- a/extensions/Review/lib/WebService.pm
+++ b/extensions/Review/lib/WebService.pm
@@ -18,6 +18,11 @@ use Bugzilla::Error;
use Bugzilla::Util qw(detaint_natural trick_taint);
use Bugzilla::WebService::Util 'filter';
+use constant PUBLIC_METHODS => qw(
+ flag_activity
+ suggestions
+);
+
sub suggestions {
my ($self, $params) = @_;
my $dbh = Bugzilla->switch_to_shadow_db();
@@ -55,7 +60,7 @@ sub suggestions {
if ($component) {
push @reviewers, @{ $component->reviewers_objs };
}
- if (!@{ $component->reviewers_objs }) {
+ if (!$component || !@{ $component->reviewers_objs }) {
push @reviewers, @{ $product->reviewers_objs };
}