From fd3ec0c08df43b4dc1352f58aa7b8ea441df3fed Mon Sep 17 00:00:00 2001 From: root <root@rivolta.investici.org> Date: Sun, 27 Feb 2011 19:29:57 +0000 Subject: [PATCH] anonymize user-agent and don't send some headers when checking for updates --- wp-includes/update.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index 98967aaed..375c86b97 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -154,11 +154,11 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) { $doing_cron = wp_doing_cron(); $options = array( - 'timeout' => $doing_cron ? 30 : 3, - 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), - 'headers' => array( - 'wp_install' => $wp_install, - 'wp_blog' => home_url( '/' ), + 'timeout' => $doing_cron ? 30 : 3, + 'user-agent' => 'WordPress/' . $wp_version . '; http://wordpress.org', + 'headers' => array( + 'wp_install' => home_url( '/' ), + 'wp_blog' => home_url( '/' ) ), 'body' => $post_body, ); @@ -383,7 +383,7 @@ function wp_update_plugins( $extra_stats = array() ) { 'locale' => wp_json_encode( $locales ), 'all' => wp_json_encode( true ), ), - 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), + 'user-agent' => 'WordPress/' . $wp_version . '; http://wordpress.org' ); if ( $extra_stats ) { @@ -587,7 +587,7 @@ function wp_update_themes( $extra_stats = array() ) { 'translations' => wp_json_encode( $translations ), 'locale' => wp_json_encode( $locales ), ), - 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), + 'user-agent' => 'WordPress/' . $wp_version . '; http://wordpress.org' ); if ( $extra_stats ) { -- GitLab