WordPress.org

Make WordPress Core

Opened 12 days ago

Closed 11 days ago

Last modified 11 days ago

#52524 closed defect (bug) (fixed)

Add extra context to the `xmlrpc_call` action

Reported by: dd32 Owned by: SergeyBiryukov
Milestone: 5.7 Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

The xmlrpc_call action currently passes the method name to the action, but fails to pass the arguments presented. That can make the action hard to use when the call passes specific content in the payload of the request.

For example, when the wp.getRevisions XML-RPC call is made, it's impossible to tell what post is being accessed via the API for dynamic filtering without reaching into the internals of the global $wp_xmlrpc_server object.

The attached PR simply adds the $args parameter to the action call along with the RPC server for consistency sake.

Change History (4)

This ticket was mentioned in PR #1004 on WordPress/wordpress-develop by dd32.


12 days ago

  • Keywords has-patch added

#2 @SergeyBiryukov
11 days ago

  • Milestone changed from Awaiting Review to 5.7
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
11 days ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 50353:

XML-RPC: Pass the method arguments and the XML-RPC server instance to the xmlrpc_call action.

This provides better context and makes the action easier to use when the call passes specific content in the payload of the request.

Props dd32.
Fixes #52524.

Note: See TracTickets for help on using tickets.