[wp-trac] [WordPress Trac] #40383: Comments Controller is not checking permission of Custom Post Type controller class

WordPress Trac noreply at wordpress.org
Tue Jul 9 18:54:31 UTC 2019


#40383: Comments Controller is not checking permission of Custom Post Type
controller class
--------------------------------------------+------------------------------
 Reporter:  langan                          |       Owner:
                                            |  TimothyBlynJacobs
     Type:  defect (bug)                    |      Status:  accepted
 Priority:  normal                          |   Milestone:  Future Release
Component:  REST API                        |     Version:  4.7
 Severity:  normal                          |  Resolution:
 Keywords:  needs-unit-tests needs-refresh  |     Focuses:
--------------------------------------------+------------------------------
Changes (by TimothyBlynJacobs):

 * keywords:  has-patch needs-unit-tests => needs-unit-tests needs-refresh
 * owner:  (none) => TimothyBlynJacobs
 * version:  4.7.3 => 4.7
 * status:  new => accepted
 * milestone:  Awaiting Review => Future Release


Comment:

 Going to take a look at this one.

 Creating a new instance would break #45677. Perhaps we should introduce
 something like `WP_Post_Type::get_rest_controller()` to ensure only one
 instance of a post type controller is created? It would also consolidate
 checking whether the class exists and falling back.

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


More information about the wp-trac mailing list