From e860e24b6efd57468b1be232a9c46c5db7531b7d Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 7 Sep 2016 13:57:29 +0000 Subject: [PATCH] Media: Sanitize upload filename. Merge of [38538] to the 4.6 branch. Built from https://develop.svn.wordpress.org/branches/4.6@38539 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38482 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 8b95181c54..c6b2dcd1ba 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -290,7 +290,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override $url = $file['url']; $type = $file['type']; $file = $file['file']; - $title = $name; + $title = sanitize_title( $name ); $content = ''; $excerpt = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 3978e74dfc..1ba8229dad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6.1-RC1-38537'; +$wp_version = '4.6.1-RC1-38539'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.