mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@39400 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -840,7 +840,7 @@ function rest_sanitize_request_arg( $value, $request, $param ) {
|
||||
}
|
||||
$args = $attributes['args'][ $param ];
|
||||
|
||||
return rest_sanitize_value_from_schema( $value, $args, $param );
|
||||
return rest_sanitize_value_from_schema( $value, $args );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user