[wp-trac] [WordPress Trac] #39042: REST API: Allow sanitization_callback to be set to null to bypass `rest_parse_request_arg()`

WordPress Trac noreply at wordpress.org
Sun Dec 11 21:25:43 UTC 2016


#39042: REST API: Allow sanitization_callback to be set to null to bypass
`rest_parse_request_arg()`
--------------------------------------+---------------------------
 Reporter:  rachelbaker               |       Owner:  kkoppenhaver
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.7.1
Component:  REST API                  |     Version:  4.7
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------------
Changes (by rachelbaker):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39563"]:
 {{{
 #!CommitTicketReference repository="" revision="39563"
 REST API: Allow schema sanitization_callback to be set to null to bypass
 fallback sanitization functions.

 The logic in WP_REST_Request->sanitize_params() added in [39091] did not
 account for `null` or `false` being the sanitization_callback preventing
 overriding `rest_parse_request_arg()`. This fixes that oversight, allowing
 the built in sanitization function to be bypassed. See #38593.

 Props kkoppenhaver, rachelbaker, jnylen0.
 Fixes #39042.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39042#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list