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

WordPress Trac noreply at wordpress.org
Mon Oct 31 17:08:35 UTC 2016


#38593: Make rest_parse_request_arg the default sanitize_callback for params
--------------------------+-----------------
 Reporter:  joehoyle      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.7
Component:  REST API      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------
 As our support for validating and sanitizing has got better, we are making
 use of it more and more throughout the codebase. Already
 `rest_parse_request_arg` (which does all the auto validation /
 sanitization) is used for the schema in `get_item_schema`, it makes sense
 to just make `rest_parse_request_arg` the default sanitizer for all params
 if a `type` is specified in the options.

 This could be disabled with `sanitize_callback => false` etc.

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


More information about the wp-trac mailing list