[wp-trac] [WordPress Trac] #36419: Request data is inconsistently slashed in REST API callbacks
WordPress Trac
noreply at wordpress.org
Tue Apr 5 03:32:19 UTC 2016
#36419: Request data is inconsistently slashed in REST API callbacks
-----------------------------+-----------------
Reporter: joehoyle | Owner:
Type: defect (bug) | Status: new
Priority: highest omg bbq | Milestone: 4.5
Component: REST API | Version: 4.4
Severity: critical | Keywords:
Focuses: |
-----------------------------+-----------------
Requests made to the REST API inconsistently have slashes added to the
data passed into a callback based off whether the data came from `$_POST`,
`$_GET`, JSON Body, or URL Params.
This is because WordPress adds slashes to the superglobals, and we don't
remove those in the REST API, which we probably should.
This will potentially break Backwards Compatibility, however because data
can be passed in a variety of ways into the REST API, this means the REST
API callbacks can not presume if the data is slashed or unslashed.
@rmccue will be filling out much more detail on this issue, and I'll be
writing a patch to unslash the superglobals before they are passed to the
request object.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36419>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list