[wp-trac] [WordPress Trac] #34725: Require registered endpoints arguments to have a validate or sanitize callback
WordPress Trac
noreply at wordpress.org
Wed Nov 18 19:10:50 UTC 2015
#34725: Require registered endpoints 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 | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+------------------
Description changed by danielbachhuber:
Old description:
> 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.
New description:
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.
Original issue on Github: https://github.com/WP-API/WP-API/issues/1223
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34725#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list