[wp-trac] [WordPress Trac] #46026: WSODs protection returns incorrect content type for XML Requests
WordPress Trac
noreply at wordpress.org
Tue Jan 22 10:12:03 UTC 2019
#46026: WSODs protection returns incorrect content type for XML Requests
------------------------------------------------+--------------------------
Reporter: spacedmonkey | Owner:
| spacedmonkey
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.1
Component: Bootstrap/Load | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing servehappy | Focuses: multisite
------------------------------------------------+--------------------------
Comment (by birgire):
In [attachment:"46026.2.diff"] there's a typo in
{{{_xml_wp_die_handler()}}} regarding the content type. Should be e.g.
{{{text/xml}}} rather than {{{application/json}}}.
The optional error title input is not used in the output of
{{{_xml_wp_die_handler()}}}, so I wonder if the error title input should
be handled in a similar way as the error message, i.e. with it's own
element:
{{{
<error>
<title>...</title>
<message>...</message>
...
</error>
}}}
I also wonder if {{{_json_wp_die_handler()}}} should add the error
{{{title}}} to the output.
I like the simplification in [attachment:"46026.2.diff"] compared to
[attachment:"46026.diff"] regarding skipping the array2xml processing and
just construct the xml directly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46026#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list