Make WordPress Core

Opened 21 months ago

Last modified 21 months ago

#37856 new defect (bug)

Prepare data before sanity check in wp_json_encode()

Reported by: swissspidy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.6
Component: General Keywords: has-patch
Focuses: Cc:


Splitting this out of #37731 as a followup to #36358.

In wp_json_encode(), the data is being prepared for JSON sanitization for _wp_json_prepare_data(). Later on, the call to _wp_json_sanity_check() doesn't use the prepared data but the raw data instead.

I don't see why this was done that way in #36358, so I'd love to hear what @rmccue has to say about it.

Attachments (1)

37856.diff (1.1 KB) - added by swissspidy 21 months ago.
Props ionutst

Download all attachments as: .zip

Change History (2)

21 months ago

Props ionutst

#1 @swissspidy
21 months ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.