From c9e60dab176635d4bfaaf431c0ea891e4726d6e0 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 7 Sep 2016 13:55:36 +0000 Subject: [PATCH] Media: Sanitize upload filename. Built from https://develop.svn.wordpress.org/trunk@38538 git-svn-id: http://core.svn.wordpress.org/trunk@38481 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 63807f71de..35aa7914c7 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -289,7 +289,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override $url = $file['url']; $type = $file['type']; $file = $file['file']; - $title = $basename; + $title = sanitize_title( $basename ); $content = ''; $excerpt = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 0a96a6ba6c..ff2113eb5a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38536'; +$wp_version = '4.7-alpha-38538'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.