[wp-trac] [WordPress Trac] #38984: REST API: Fix incorrect calls to `rest_sanitize_value_from_schema`

WordPress Trac noreply at wordpress.org
Wed Nov 30 01:59:35 UTC 2016


#38984: REST API: Fix incorrect calls to `rest_sanitize_value_from_schema`
--------------------------+--------------------
 Reporter:  jnylen0       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------

Comment (by jnylen0):

 Replying to [comment:3 rachelbaker]:
 > @jnylen0 for the username we can't simply use any string value. There
 are invalid characters that need to be stripped.

 This is already handled (see `validate_username` call in the
 `check_username` function, and
 [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/rest-
 api/rest-users-controller.php?rev=39370#L725 associated tests])

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


More information about the wp-trac mailing list