Opened 8 years ago
Closed 8 years ago
#38529 closed defect (bug) (fixed)
REST API controllers should not use the default sanitizers for polymorphic arguments
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | REST API | Keywords: | has-patch needs-refresh |
Focuses: | Cc: |
Description
See https://github.com/WP-API/WP-API/pull/2853 for more details, essentially we don't want to use the default jsonschema validation in the case of the polymorphic values such as "content", "title" and "excerpt". When we support validating objects, we don't want to use that option.
Attachments (2)
Change History (7)
#2
@
8 years ago
- Keywords has-patch needs-refresh added; commit removed
- Owner changed from rachelbaker to joehoyle
#3
@
8 years ago
Would also be good to add unit tests to make sure we don't accidentally set the sanitize or validate callbacks.
Note: See
TracTickets for help on using
tickets.
@joehoyle The comment here is a little confusing.
Note: sanitization implemented in callback.
would lead me to expect there SHOULD be a callback function set here.Instead, you are setting the
sanitize_callback
tonull
and instead the sanitization/validation is handled within the controllersprepare_item_for_database()
method.