WordPress.org

Make WordPress Core

Changes between Initial Version and Version 27 of Ticket #45933


Ignore:
Timestamp:
01/17/2019 07:05:55 PM (3 months ago)
Author:
spacedmonkey
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #45933

    • Property Status changed from new to reviewing
    • Property Summary changed from WSODs protection returns incorrect content type to WSODs protection returns incorrect content type for JSON Requests
    • Property Owner set to flixos90
    • Property Milestone changed from Awaiting Review to 5.1
    • Property Keywords needs-testing added
  • Ticket #45933 – Description

    initial v27  
    1 While testing WSODs protection  ( #44458 ), I noticed that on REST API calls and RSS feeds, that wrong content type is returned. The REST API expects valid json to be returned. Other invalid rest requests, return an error state  in the following format.
     1While testing WSODs protection  ( #44458 ), I noticed that on REST API calls that wrong content type is returned. The REST API expects valid json to be returned. Other invalid rest requests, return an error state  in the following format.
    22
    33{{{#!php
     
    1111}}}
    1212
    13 As for RSS feeds, what is returned is not valid XML and will likely break most feed readers that are parsing them.
    1413
    1514This issue is that `wp_die`, has go handles for, admin ajax, xmlrpc and html responses. But doesn't check for feed or rest api rests.