From d548221ddb7365d25b5820df60aab476dda1be0f Mon Sep 17 00:00:00 2001 From: Xavier L'Hour Date: Fri, 27 Nov 2026 16:35:40 +0100 Subject: [PATCH 1/2] Bug 2098202 - Remove the jsonrpc and rest features and the JSON::RPC and Test::Taint dependencies Since the legacy REST server was removed, nothing loads JSON::RPC or Test::Taint. - Drop the feature_enabled('jsonrpc') checks for user autocompletion and possible duplicates, and check_comment_taggers_group: the comment_taggers_group parameter now uses check_group - Remove the jsonrpc and rest features from Makefile.PL - Remove JSON::RPC and Test::Taint from cpanfile and cpanfile.snapshot, with Router::Simple which only JSON::RPC needed, and the Test::Taint exception in Bugzilla::CPAN --- Bugzilla/CPAN.pm | 2 +- Bugzilla/Config/Common.pm | 14 ----- Bugzilla/Config/GroupSecurity.pm | 2 +- Makefile.PL | 14 ----- cpanfile | 2 - cpanfile.snapshot | 59 ------------------- .../en/default/bug/create/create.html.tmpl | 2 +- .../en/default/global/userselect.html.tmpl | 2 +- template/en/default/search/form.html.tmpl | 2 +- 9 files changed, 5 insertions(+), 94 deletions(-) diff --git a/Bugzilla/CPAN.pm b/Bugzilla/CPAN.pm index 81e12c79ba..b6019d9259 100644 --- a/Bugzilla/CPAN.pm +++ b/Bugzilla/CPAN.pm @@ -106,7 +106,7 @@ sub feature { my $feature = $meta->feature($feature_name); my @modules = $feature->prereqs->merged_requirements(['runtime'], ['requires']) ->required_modules; - Module::Runtime::require_module($_) foreach grep { !/^Test::Taint$/ } @modules; + Module::Runtime::require_module($_) foreach @modules; return $FEATURE_LOADED{$feature_name} = 1; } diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index 389cea9d10..e136435b4d 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -31,7 +31,6 @@ use base qw(Exporter); check_mail_delivery_method check_notification check_utf8 check_bug_status check_smtp_auth check_theschwartz_available check_maxattachmentsize check_email - check_comment_taggers_group get_all_group_names ); @@ -325,14 +324,6 @@ sub check_theschwartz_available { return ""; } -sub check_comment_taggers_group { - my $group_name = shift; - if ($group_name && !Bugzilla->feature('jsonrpc')) { - return "Comment tagging requires installation of the JSON-RPC feature"; - } - return check_group($group_name); -} - sub get_all_group_names { my $group_names = ['']; try { @@ -443,9 +434,4 @@ Checks that the value is a valid number Checks that the value is a valid regexp -=item C - -Checks that the required modules for comment tagging are installed, and that a -valid group is provided. - =back diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm index 3d17ed399a..d1d3f14cf9 100644 --- a/Bugzilla/Config/GroupSecurity.pm +++ b/Bugzilla/Config/GroupSecurity.pm @@ -67,7 +67,7 @@ sub get_param_list { type => 's', choices => \&get_all_group_names, default => 'editbugs', - checker => \&check_comment_taggers_group + checker => \&check_group }, { diff --git a/Makefile.PL b/Makefile.PL index 1c76a3b00b..81cc2e1107 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -230,13 +230,6 @@ my %optional_features = ( description => 'MySQL database support', prereqs => {runtime => {requires => {'DBD::mysql' => '== 4.051', 'DateTime::Format::MySQL' => '0.06'}}} }, - jsonrpc => { - description => 'JSON-RPC Interface', - prereqs => { - runtime => - {requires => {'JSON::RPC' => '== 1.01', 'Test::Taint' => '1.06'}} - } - }, graphical_reports => { description => 'Graphical Reports', prereqs => { @@ -272,13 +265,6 @@ my %optional_features = ( description => 'Patch Viewer', prereqs => {runtime => {requires => {PatchReader => '0.9.6'}}} }, - rest => { - description => 'REST Interface', - prereqs => { - runtime => - {requires => {'Test::Taint' => '1.06', 'JSON::RPC' => '==1.01',}} - } - }, linux_pid => { description => 'Linux::PID', prereqs => {runtime => {requires => {'Linux::Pid' => 0},},}, diff --git a/cpanfile b/cpanfile index c3915ccf64..e77a0cac50 100644 --- a/cpanfile +++ b/cpanfile @@ -63,7 +63,6 @@ requires 'IO::Compress::Gzip'; requires 'IO::Scalar'; requires 'IPC::System::Simple'; requires 'JSON::MaybeXS', '1.003008'; -requires 'JSON::RPC', '== 1.01'; requires 'JSON::Validator', '3.05'; requires 'JSON::XS', '2.0'; requires 'LWP::Protocol::https', '6.07'; @@ -110,7 +109,6 @@ requires 'Template::Plugin::GD::Image'; requires 'Test::CPAN::Meta'; requires 'Test::Pod'; requires 'Test::Pod::Coverage'; -requires 'Test::Taint', '1.06'; requires 'Text::CSV_XS', '1.26'; requires 'Text::Diff'; requires 'Text::MultiMarkdown', '1.000034'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 51c06b3ae7..a9981725a0 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3835,38 +3835,6 @@ DISTRIBUTIONS JSON::PP 2.27300 Scalar::Util 0 perl 5.006 - JSON-RPC-1.01 - pathname: D/DM/DMAKI/JSON-RPC-1.01.tar.gz - provides: - JSON::RPC 1.01 - JSON::RPC::Constants undef - JSON::RPC::Dispatch undef - JSON::RPC::Legacy undef - JSON::RPC::Legacy::Client 0.93 - JSON::RPC::Legacy::Procedure 0.90 - JSON::RPC::Legacy::ReturnObject 0.93 - JSON::RPC::Legacy::Server 0.92 - JSON::RPC::Legacy::Server::Apache2 0.05 - JSON::RPC::Legacy::Server::CGI 0.92 - JSON::RPC::Legacy::Server::Daemon 0.03 - JSON::RPC::Legacy::Server::system 0.92 - JSON::RPC::Legacy::ServiceObject 0.93 - JSON::RPC::Parser undef - JSON::RPC::Procedure undef - requirements: - CGI 0 - Class::Accessor::Lite 0 - ExtUtils::MakeMaker 6.42 - HTTP::Request 0 - HTTP::Response 0 - JSON 0 - LWP::UserAgent 0 - Plack 0 - Plack::Request 0 - Plack::Test 0 - Router::Simple 0 - Test::More 0 - parent 0 JSON-Validator-5.19 pathname: J/JH/JHTHORSEN/JSON-Validator-5.19.tar.gz provides: @@ -6632,20 +6600,6 @@ DISTRIBUTIONS requirements: Exporter 0 perl 5.006 - Router-Simple-0.17 - pathname: T/TO/TOKUHIROM/Router-Simple-0.17.tar.gz - provides: - Router::Simple 0.17 - Router::Simple::Declare undef - Router::Simple::Route undef - Router::Simple::SubMapper undef - requirements: - Class::Accessor::Lite 0.05 - List::Util 0 - Module::Build 0.38 - Scalar::Util 0 - parent 0 - perl 5.008_001 SOAP-Lite-1.27 pathname: P/PH/PHRED/SOAP-Lite-1.27.tar.gz provides: @@ -7477,19 +7431,6 @@ DISTRIBUTIONS Test::SharedFork 0.29 Time::HiRes 0 perl 5.008001 - Test-Taint-1.08 - pathname: P/PE/PETDANCE/Test-Taint-1.08.tar.gz - provides: - Test::Taint 1.08 - requirements: - ExtUtils::MakeMaker 0 - Scalar::Util 0 - Test::Builder 0 - Test::More 0 - Tie::Array 0 - Tie::Hash 0 - Tie::Scalar 0 - overload 0 Test-WWW-Selenium-1.36 pathname: M/MA/MATTP/Test-WWW-Selenium-1.36.tar.gz provides: diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 62b0bb9905..ec3e1587e5 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -531,7 +531,7 @@ TUI_hide_default('expert_fields'); - [% IF feature_enabled('jsonrpc') AND !cloned_bug_id + [% IF !cloned_bug_id AND user.settings.possible_duplicates.value == 'on' %] Possible
Duplicates: diff --git a/template/en/default/global/userselect.html.tmpl b/template/en/default/global/userselect.html.tmpl index c5d8c87201..b6be8c133f 100644 --- a/template/en/default/global/userselect.html.tmpl +++ b/template/en/default/global/userselect.html.tmpl @@ -82,7 +82,7 @@ [% ELSE %] [% - IF id && feature_enabled('jsonrpc') && Param('ajax_user_autocompletion'); + IF id && Param('ajax_user_autocompletion'); IF !classes.defined; classes = []; END; diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index c2f6a0bb8d..448dfe5828 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -355,7 +355,7 @@ TUI_hide_default('custom_search_query'); From 8b071a5c7de4552dcd7fd9e75e48b177ea9bf902 Mon Sep 17 00:00:00 2001 From: Xavier L'Hour Date: Fri, 27 Nov 2026 21:29:22 +0100 Subject: [PATCH 2/2] Bug 2098202 - Declare the JSON dependency and stop mentioning JSON-RPC in comments - Bugzilla::Token and several extensions use JSON directly, but it was only installed as a dependency of other modules, JSON::RPC among them. Add it to Makefile.PL and cpanfile - Remove JSON-RPC from comments in Bugzilla::Object, Bugzilla::Template and Bugzilla::Util --- Bugzilla/Object.pm | 2 +- Bugzilla/Template.pm | 2 +- Bugzilla/Util.pm | 2 +- Makefile.PL | 1 + cpanfile | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 12debf40bb..53b5ba74b6 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -48,7 +48,7 @@ use constant IS_CONFIG => 0; # When DYNAMIC_COLUMNS is true, _get_db_columns() will use the information schema. use constant DYNAMIC_COLUMNS => 0; -# This allows the JSON-RPC interface to return Bugzilla::Object instances +# This allows the API to return Bugzilla::Object instances # as though they were hashes. In the future, this may be modified to return # less information. sub TO_JSON { return {%{$_[0]}}; } diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 2c5ed9c94e..8f51f6943e 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -872,7 +872,7 @@ sub create { # And if we're not in the WebService, wrap the message. # (Wrapping the message in the WebService is unnecessary # and causes awkward things like \n's appearing in error - # messages in JSON-RPC.) + # API error messages.) unless (i_am_webservice()) { $var = wrap_comment($var, 72); } diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index a78604fa10..20fe79254c 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -1259,7 +1259,7 @@ in a command-line script. =item C Tells you whether or not the current usage mode is WebServices related -such as JSON-RPC or REST. +such as the REST API. =item C diff --git a/Makefile.PL b/Makefile.PL index 81cc2e1107..2e31a0042a 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -68,6 +68,7 @@ my %requires = ( 'HTML::Escape' => '1.10', 'IO::Async' => '0.71', 'IPC::System::Simple' => 0, + 'JSON' => 0, 'JSON::MaybeXS' => '1.003008', 'JSON::Validator' => '3.05', 'JSON::XS' => '2.01', diff --git a/cpanfile b/cpanfile index e77a0cac50..9fcd8f13d1 100644 --- a/cpanfile +++ b/cpanfile @@ -62,6 +62,7 @@ requires 'IO::Async', '0.71'; requires 'IO::Compress::Gzip'; requires 'IO::Scalar'; requires 'IPC::System::Simple'; +requires 'JSON'; requires 'JSON::MaybeXS', '1.003008'; requires 'JSON::Validator', '3.05'; requires 'JSON::XS', '2.0';