[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
Tue Dec 27 17:48:14 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:
--------------------------------------+---------------------------

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/39042#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list