From 05facab3d65f65956714d6de967313ac3c33ee37 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Nov 2014 15:24:40 +0000 Subject: [PATCH] Validate image data. git-svn-id: https://develop.svn.wordpress.org/trunk@30458 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/image.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php index b78bac2a56..5fc7161e4f 100644 --- a/src/wp-admin/includes/image.php +++ b/src/wp-admin/includes/image.php @@ -401,6 +401,12 @@ function wp_read_image_metadata( $file ) { } } + foreach ( $meta as &$value ) { + if ( is_string( $value ) ) { + $value = wp_kses_post( $value ); + } + } + /** * Filter the array of meta data read from an image's exif data. *