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
This commit is contained in:
nacin 2010-03-23 19:13:58 +00:00
parent e507f32dd4
commit 47b80515da
2 changed files with 17 additions and 14 deletions

View File

@ -654,22 +654,10 @@ function win_is_writable($path) {
return true; 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) * Display the default admin color scheme picker (Used in user-edit.php)
* *
* @since 3.0 * @since 3.0.0
*/ */
function admin_color_scheme_picker() { function admin_color_scheme_picker() {
global $_wp_admin_css_colors, $user_id; ?> global $_wp_admin_css_colors, $user_id; ?>

View File

@ -4081,4 +4081,19 @@ function __return_true() {
*/ */
function __return_false() { function __return_false() {
return false; return false;
} }
/**
* 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' );
}
?>