From 47b80515da426ba83ebca2a4df2e860121e45e43 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 23 Mar 2010 19:13:58 +0000 Subject: [PATCH] Move send_nosniff_header() into wp-includes so it can be used in wp-ajax.php. props sivel, fixes #12683 git-svn-id: http://svn.automattic.com/wordpress/trunk@13806 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/misc.php | 14 +------------- wp-includes/functions.php | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 3bf91696f4..1570b74d30 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -654,22 +654,10 @@ function win_is_writable($path) { return true; } -/** - * Send a HTTP header to disable content type sniffing in browsers which support it. - * - * @link http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx - * @link http://src.chromium.org/viewvc/chrome?view=rev&revision=6985 - * - * @since 3.0.0. - * @return none - */ -function send_nosniff_header() { - @header( 'X-Content-Type-Options: nosniff' ); -} /** * Display the default admin color scheme picker (Used in user-edit.php) * - * @since 3.0 + * @since 3.0.0 */ function admin_color_scheme_picker() { global $_wp_admin_css_colors, $user_id; ?> diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0993b7574d..a462b8deda 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4081,4 +4081,19 @@ function __return_true() { */ function __return_false() { return false; -} \ No newline at end of file +} + +/** + * Send a HTTP header to disable content type sniffing in browsers which support it. + * + * @link http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx + * @link http://src.chromium.org/viewvc/chrome?view=rev&revision=6985 + * + * @since 3.0.0 + * @return none + */ +function send_nosniff_header() { + @header( 'X-Content-Type-Options: nosniff' ); +} + +?> \ No newline at end of file