[wp-trac] [WordPress Trac] #34725: Require registered endppoints arguments to have a validate or sanitize callback

WordPress Trac noreply at wordpress.org
Wed Nov 18 16:53:09 UTC 2015


#34725: Require registered endppoints arguments to have a validate or sanitize
callback
-----------------------------+-------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  4.4
Component:  REST API         |    Version:
 Severity:  normal           |   Keywords:  needs-patch
  Focuses:                   |
-----------------------------+-------------------------
 From https://github.com/WP-API/WP-API/pull/1281#issuecomment-111337989:

 > We're going to tone this one down a bit. Instead of requiring all
 arguments to be registered, we're going to require all registered
 arguments to have either a validation callback or a sanitisation callback
 (or both!). This stops people from accidentally misspelling
 validate_callback/sanitize_callback, but won't stop them from accessing
 other unregistered arguments.

 Currently, developers can register arguments without any default form of
 validation or sanitization.

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


More information about the wp-trac mailing list