From 676ae9fc2b0765c97c48bb20b5950274c6ed6460 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Thu, 3 Nov 2016 01:26:28 +0000 Subject: [PATCH] REST API: Use the `items` attribute for the taxonomies `types` schema property for proper sanitization/validation. Props danielbachhuber, joehoyle. Fixes #38631. Built from https://develop.svn.wordpress.org/trunk@39103 git-svn-id: http://core.svn.wordpress.org/trunk@39045 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-taxonomies-controller.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php index 98a5e21a3e..5ae26212df 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php @@ -279,6 +279,9 @@ class WP_REST_Taxonomies_Controller extends WP_REST_Controller { 'types' => array( 'description' => __( 'Types associated with resource.' ), 'type' => 'array', + 'items' => array( + 'type' => 'string', + ), 'context' => array( 'view', 'edit' ), 'readonly' => true, ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 013d3ea29b..7cb4947f6d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39102'; +$wp_version = '4.7-beta1-39103'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.