[wp-trac] [WordPress Trac] #34659: Whitelist for validation functions which only accept one argument

WordPress Trac noreply at wordpress.org
Fri Sep 23 01:05:53 UTC 2016


#34659: Whitelist for validation functions which only accept one argument
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |       Owner:  rmccue
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  Future Release
Component:  REST API         |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+-----------------------------
Changes (by rmccue):

 * keywords:  has-patch has-unit-tests => needs-patch


Comment:

 I want to solve this with `sanitize_callback_args` and
 `validate_callback_args`, which are used as a number in `array_slice`.
 This matches the `$accepted_args` parameter to `add_filter`, and is
 completely backwards compatible, plus doesn't involve some weird special
 whitelist for specific functions.

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


More information about the wp-trac mailing list