Guest User

wp_leak_patch

a guest
Sep 19th, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.61 KB | None | 0 0
  1.  wp-includes/update.php |    4 ++--
  2.  1 files changed, 2 insertions(+), 2 deletions(-)
  3.  
  4. diff --git a/wp-includes/update.php b/wp-includes/update.php
  5. index 1f9f2a9..da29e93 100644
  6. --- a/wp-includes/update.php
  7. +++ b/wp-includes/update.php
  8. @@ -57,13 +57,13 @@ function wp_version_check() {
  9.     }
  10.  
  11.     $local_package = isset( $wp_local_package )? $wp_local_package : '';
  12. -   $url = "http://api.wordpress.org/core/version-check/1.5/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package&blogs=$num_blogs&users={$user_count['total_users']}&multisite_enabled=$multisite_enabled";
  13. +   $url = "http://api.wordpress.org/core/version-check/1.5/?version=$wp_version&php=N/A&locale=$locale&mysql=N/A&local_package=&blogs=31337&users=31337&multisite_enabled=0";
  14.  
  15.     $options = array(
  16.         'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),
  17.         'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
  18.         'headers' => array(
  19. -           'wp_install' => $wp_install,
  20. +           'wp_install' => home_url( '/' ),
  21.             'wp_blog' => home_url( '/' )
  22.         )
  23.     );
  24.  
  25.  
  26. #######################################################################
  27.  
  28.  
  29.  
  30.  wp-includes/update.php |   10 +++-------
  31.  1 files changed, 3 insertions(+), 7 deletions(-)
  32.  
  33. diff --git a/wp-includes/update.php b/wp-includes/update.php
  34. index da29e93..48ba15e 100644
  35. --- a/wp-includes/update.php
  36. +++ b/wp-includes/update.php
  37. @@ -61,11 +61,7 @@ function wp_version_check() {
  38.  
  39.     $options = array(
  40.         'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),
  41. -       'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
  42. -       'headers' => array(
  43. -           'wp_install' => home_url( '/' ),
  44. -           'wp_blog' => home_url( '/' )
  45. -       )
  46. +       'user-agent' => 'WordPress/3.0; http://wordpress.org'
  47.     );
  48.  
  49.     $response = wp_remote_get($url, $options);
  50. @@ -169,7 +165,7 @@ function wp_update_plugins() {
  51.     $options = array(
  52.         'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
  53.         'body' => array( 'plugins' => serialize( $to_send ) ),
  54. -       'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
  55. +       'user-agent' => 'WordPress/3.0; http://wordpress.org'
  56.     );
  57.  
  58.     $raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options);
  59. @@ -267,7 +263,7 @@ function wp_update_themes( ) {
  60.     $options = array(
  61.         'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
  62.         'body'          => array( 'themes' => serialize( $themes ) ),
  63. -       'user-agent'    => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
  64. +       'user-agent' => 'WordPress/3.0; http://wordpress.org'
  65.     );
  66.  
  67.     $raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options );
  68.  
  69.  
  70.  
  71.  
  72. #######################################################################
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  wp-includes/class-http.php |    2 +-
  85.  1 files changed, 1 insertions(+), 1 deletions(-)
  86.  
  87. diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php
  88. index 5d7f83d..93bfe25 100644
  89. --- a/wp-includes/class-http.php
  90. +++ b/wp-includes/class-http.php
  91. @@ -220,7 +220,7 @@ class WP_Http {
  92.             'timeout' => apply_filters( 'http_request_timeout', 5),
  93.             'redirection' => apply_filters( 'http_request_redirection_count', 5),
  94.             'httpversion' => apply_filters( 'http_request_version', '1.0'),
  95. -           'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )  ),
  96. +           'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; http://wordpress.org' ),
  97.             'blocking' => true,
  98.             'headers' => array(),
  99.             'cookies' => array(),
Advertisement
Add Comment
Please, Sign In to add comment