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

WordPress Trac noreply at wordpress.org
Sun Jan 13 21:29:30 UTC 2019


#45933: WSODs protection returns incorrect content type
----------------------------------+------------------------------
 Reporter:  spacedmonkey          |       Owner:  (none)
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Bootstrap/Load        |     Version:  trunk
 Severity:  normal                |  Resolution:
 Keywords:  servehappy has-patch  |     Focuses:  multisite
----------------------------------+------------------------------

Comment (by spacedmonkey):

 Thanks for your feedback @rmccue and @ocean90 . I have modified the patch
 accordingly.

 Allowing changes are in
 [https://core.trac.wordpress.org/attachment/ticket/45933/45933.1.diff
 45933.1.diff].

 1. `wp_die` uses `wp_is_json_request`.
 2. `_json_wp_die_handler` introduced.
 3. `_json_wp_die_handler` handles `WP_Error` being passed.
 4. `wp_is_json_request` now defects jsonp requests (is another bug I found
 while looking at this).
 5. `display_error_template` method, now uses `WP_Error` where possible.


 I want to get this right with json responses, before looking at XML /
 feeds.

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


More information about the wp-trac mailing list