Skip to content
Snippets Groups Projects
Commit ed7596e8 authored by root's avatar root Committed by agata
Browse files

anonymize user-agent and don't send some headers when checking for updates

parent 653a2aa2
No related branches found
No related tags found
No related merge requests found
...@@ -143,10 +143,10 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) { ...@@ -143,10 +143,10 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
$options = array( $options = array(
'timeout' => $doing_cron ? 30 : 3, 'timeout' => $doing_cron ? 30 : 3,
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), 'user-agent' => 'WordPress/' . $wp_version . '; http://wordpress.org',
'headers' => array( 'headers' => array(
'wp_install' => $wp_install, 'wp_install' => home_url( '/' ),
'wp_blog' => home_url( '/' ), 'wp_blog' => home_url( '/' )
), ),
'body' => $post_body, 'body' => $post_body,
); );
...@@ -363,7 +363,7 @@ function wp_update_plugins( $extra_stats = array() ) { ...@@ -363,7 +363,7 @@ function wp_update_plugins( $extra_stats = array() ) {
'locale' => wp_json_encode( $locales ), 'locale' => wp_json_encode( $locales ),
'all' => wp_json_encode( true ), 'all' => wp_json_encode( true ),
), ),
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), 'user-agent' => 'WordPress/' . $wp_version . '; http://wordpress.org'
); );
if ( $extra_stats ) { if ( $extra_stats ) {
...@@ -553,7 +553,7 @@ function wp_update_themes( $extra_stats = array() ) { ...@@ -553,7 +553,7 @@ function wp_update_themes( $extra_stats = array() ) {
'translations' => wp_json_encode( $translations ), 'translations' => wp_json_encode( $translations ),
'locale' => wp_json_encode( $locales ), 'locale' => wp_json_encode( $locales ),
), ),
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), 'user-agent' => 'WordPress/' . $wp_version . '; http://wordpress.org'
); );
if ( $extra_stats ) { if ( $extra_stats ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment