[wp-trac] [WordPress Trac] #42238: Notice when Rest Comments controler is checking permision for a non existent post type

WordPress Trac noreply at wordpress.org
Mon Nov 25 20:52:16 UTC 2019


#42238: Notice when Rest Comments controler is checking permision for a non
existent post type
-------------------------------------------------+-------------------------
 Reporter:  dragosh635                           |       Owner:
                                                 |  TimothyBlynJacobs
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.4
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):

 * keywords:  needs-unit-tests good-first-bug has-patch => good-first-bug
     has-patch has-unit-tests
 * milestone:  Future Release => 5.4


Comment:

 Thanks for adding the unit test @imani3011!

 I uploaded a patch combining your two patches into one and made some code
 style fixes

 Instead of checking for a 200 response on the collection, I changed the
 test to specifically test for a 403 response. That way we are sure the
 comment isn't being inadvertently exposed.

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


More information about the wp-trac mailing list