[wp-trac] [WordPress Trac] #49645: get_item function broken in rest-api

WordPress Trac noreply at wordpress.org
Fri Mar 13 16:45:55 UTC 2020


#49645: get_item function broken in rest-api
--------------------------+-----------------------------
 Reporter:  yohannp       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  5.3.2
 Severity:  major         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 Due to this commit, a delete permission check has been added to get_item
 function in class-wp-rest-revisions-controller.php.
 It seems this permission check was added by this commit :
 https://github.com/WordPress/WordPress/commit/00cb4c7dbdd3a0bbf1f7da0898a72e12198a61d5
 #diff-df4c11238da6b9e0e261b38f895720f1R352. This breaks some preview
 plugins using WordPress REST API.
 Obviously, this seems to be kind of a copy/paste mistake as there is no
 reason to have a delete_post permission check on a get item...

 Thanks,

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49645>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list