[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:18:42 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:
-------------------------------------------+--------------------------

Comment (by rachelbaker):

 In [changeset:"39401"]:
 {{{
 #!CommitTicketReference repository="" revision="39401"
 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.

 Merges [39400] to the 4.7 branch.
 Fixes #38984 for 4.7.
 }}}

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


More information about the wp-trac mailing list