[wp-trac] [WordPress Trac] #59875: Revisions controller: get_item can return a revision whose parent does not match the `parent` route fragment

WordPress Trac noreply at wordpress.org
Fri Dec 22 02:10:35 UTC 2023


#59875: Revisions controller: get_item can return a revision whose parent does not
match the `parent` route fragment
---------------------------------------------+-----------------------------
 Reporter:  ramonopoly                       |       Owner:
                                             |  adamsilverstein
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.5
Component:  REST API                         |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-unit-tests has-patch commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------------
Changes (by isabel_brison):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"57222" 57222]:
 {{{
 #!CommitTicketReference repository="" revision="57222"
 REST API: check parent and revision ids match before retrieving revision.

 Adds a condition to check that parent id matches revision parent id in
 `WP_REST_Revisions_Controller` `get_item` method.

 Props ramonopoly, adamsilverstein, danielbachhuber, spacedmonkey,
 andrewserong.
 Fixes #59875.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59875#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list