[wp-trac] [WordPress Trac] #45933: WSODs protection returns incorrect content type

WordPress Trac noreply at wordpress.org
Wed Jan 16 23:29:19 UTC 2019


#45933: WSODs protection returns incorrect content type
--------------------------------------------------+------------------------
 Reporter:  spacedmonkey                          |       Owner:  flixos90
     Type:  defect (bug)                          |      Status:  reviewing
 Priority:  normal                                |   Milestone:  5.1
Component:  Bootstrap/Load                        |     Version:  trunk
 Severity:  normal                                |  Resolution:
 Keywords:  servehappy needs-patch needs-testing  |     Focuses:  multisite
--------------------------------------------------+------------------------
Changes (by spacedmonkey):

 * keywords:  servehappy needs-patch => servehappy needs-patch needs-testing


Comment:

 I have broken these 3 issues into 3 different diff files, so parts can be
 merged without holding other parts.

 1. 45933.5.diff simply add jsonp support to response. This stop invalid
 json being returned for those using the REST API.
 2. 45933.6.diff add a new helper function that process values inputted
 into wp_die and gets values of WP_error and returns formatted array. This
 means patch makes xmlrpc, json, and admin-ajax all allow wp_error object
 to be passed to them.
 3. 45933.7.diff Is a first pass at xml wp die handler. It is very similar
 to json handler but with some special code to output as xml. I couldn't
 find a risk free way of using `simplexmlelement` class, so I wrote a
 little helper function called `_wp_wrap_xml`. It would be best if
 45933.7.diff goes in, that 45933.6.diff goes in as well, as they are
 designed to work together.

 Looping in @flixos90 and @schlessera for code review.

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


More information about the wp-trac mailing list