Skip to content

Bug 2058158 - Remove jsonrpc.cgi and disallow the JSONRPC endpoint - #2691

Merged
dklawren merged 2 commits into
mozilla-bteam:masterfrom
Xzzz:bug-2058158
Aug 4, 2026
Merged

Bug 2058158 - Remove jsonrpc.cgi and disallow the JSONRPC endpoint#2691
dklawren merged 2 commits into
mozilla-bteam:masterfrom
Xzzz:bug-2058158

Conversation

@Xzzz

@Xzzz Xzzz commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the jsonrpc.cgi entry point and the now-dead references to it.
Note: Bugzilla::WebService::Server::JSONRPC itself stays, since REST.pm still inherits from it.

This is the third of a small set of child bugs cleaning up the old API surface, see 1599274 for details.

Changes

  • Delete jsonrpc.cgi
  • Bugzilla.pm: drop the dead USAGE_MODE_JSON / jsonrpc branch in log_user_request
  • Bugzilla/Install/Requirements.pm: remove the jsonrpc FEATURE_FILES entry
  • Bugzilla/Hook.pm: fix the POD reference to jsonrpc.cgi
  • user-error.html.tmpl: remove JSON-RPC-specific error copy

Test plan

  • Confirmed /jsonrpc.cgi now 404s.
  • Confirmed the REST API (/rest/...) still works - REST.pm still subclasses JSONRPC.pm, so verify that inheritance path is unaffected
  • perl -c / PPI sanity check on the touched core modules

References

Xzzz added 2 commits August 4, 2026 20:59
Also drops the now-dead references to it (Requirements.pm, Bugzilla.pm, Hook.pm POD, user-error.html.tmpl). JSONRPC.pm itself stays, since REST.pm still inherits from it.
- json_rpc_get_method_required
- json_rpc_illegal_content_type
- json_rpc_post_only

@dklawren dklawren left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=dkl

use constant FEATURE_FILES => (
rest => ['Bugzilla/WebService/Server/REST.pm', 'rest.cgi'],
jsonrpc => ['Bugzilla/WebService/Server/JSONRPC.pm', 'jsonrpc.cgi'],
jsonrpc => ['Bugzilla/WebService/Server/JSONRPC.pm'],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pod in Bugzilla/WebService/Server/JSONRPC.pm still documents jsonrpc.cgi as the endpoint (the CONNECTING and JSONP sections, plus the sample urls). We can leave it alone since this file will disappear completely in the future. No one reads the perldoc except for developers. It is not documented on readthedocs.

@dklawren
dklawren merged commit 9c2e16d into mozilla-bteam:master Aug 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants