Opened 4 years ago
Closed 3 years ago
#52691 closed defect (bug) (fixed)
Check if JSONP is enabled prior to outputting the jsonp-type content-type
Reported by: | dd32 | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 5.8 | Priority: | lowest |
Severity: | trivial | Version: | |
Component: | REST API | Keywords: | has-patch commit |
Focuses: | rest-api | Cc: |
Description
Currently when JSONP is disabled, the Content-Type
header is still output as if the response will be a jsonp response (But it won't be).
The attached PR simply runs the filter before outputting the header.
This still isn't strictly correct for all cases, as an invalid jsonp callback will still output non-jsonp using the jsonp content-type, but that's not a regression here, and I wasn't sure about shifting the invalid jsonp callback sanitization earlier in the function.
Change History (3)
This ticket was mentioned in PR #1063 on WordPress/wordpress-develop by dd32.
4 years ago
#1
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/52691