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

WordPress Trac noreply at wordpress.org
Mon Jan 21 16:01:58 UTC 2019


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

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44666" 44666]:
 {{{
 #!CommitTicketReference repository="" revision="44666"
 Bootstrap/Load: Support `WP_Error` and `$args` passed to `wp_die()`
 consistently in all handlers.

 Prior to this change, each `wp_die()` handler had their own logic for how
 to parse arguments, causing inconsistencies and even breakage because the
 arguments possible to pass to `wp_die()` depended on the request context.
 Passing a `WP_Error` as `$message` for example used to be only support by
 the default handler, but not the AJAX and XML-RPC handlers.

 With the fatal error protection, plus the new `wp_die()` handlers related
 to that, improving this support and compatibility has become more
 significant. Therefore this changeset introduces a private
 `_wp_die_process_input()` function that handles all function parameters
 consistently.

 Props spacedmonkey, flixos90, schlessera.
 Fixes #45933. See #44458.
 }}}

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


More information about the wp-trac mailing list