[wp-trac] [WordPress Trac] #38593: Make rest_parse_request_arg the default sanitize_callback for params

WordPress Trac noreply at wordpress.org
Tue Dec 27 17:48:13 UTC 2016


#38593: Make rest_parse_request_arg the default sanitize_callback for params
-------------------------+-----------------------
 Reporter:  joehoyle     |       Owner:  joehoyle
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.7
Component:  REST API     |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:               |     Focuses:
-------------------------+-----------------------

Comment (by rachelbaker):

 In [changeset:"39642"]:
 {{{
 #!CommitTicketReference repository="" revision="39642"
 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.

 Merges [39563] to the 4.7  branch.

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

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


More information about the wp-trac mailing list