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

WordPress Trac noreply at wordpress.org
Thu Dec 1 02:11:58 UTC 2016


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

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39400"]:
 {{{
 #!CommitTicketReference repository="" revision="39400"
 REST API: Fix incorrect uses of `rest_sanitize_value_from_schema()`.

 In the `check_username()` and `check_password()` callbacks in the Users
 controller cast the provided request value to a string. The
 `rest_sanitize_value_from_schema()` function was being used incorrectly
 which was causing unintended request parsing.
 In `rest_sanitize_request_arg()` do not pass nonexistent third parameter
 for the `rest_sanitize_value_from_schema()` function.

 Props jnylen0, joehoyle, rachelbaker, ocean90.
 Fixes #38984.
 }}}

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


More information about the wp-trac mailing list