From b7080959f6cf6e37e8f2fbcb519bbb38af04a95d Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 17 Sep 2011 09:14:27 +0000 Subject: [PATCH] Use http_build_query in the Core Update check to encode version numbers. Props kurtpayne. Fixes #18051 git-svn-id: http://svn.automattic.com/wordpress/trunk@18697 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/update.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index 9de040c301..61d7ca3dcc 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -57,8 +57,18 @@ function wp_version_check() { $wp_install = home_url( '/' ); } - $local_package = isset( $wp_local_package )? $wp_local_package : ''; - $url = "http://api.wordpress.org/core/version-check/1.6/?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"; + $query = array( + 'version' => $wp_version, + 'php' => $php_version, + 'locale' => $locale, + 'mysql' => $mysql_version, + 'local_package' => isset( $wp_local_package ) ? $wp_local_package : '', + 'blogs' => $num_blogs, + 'users' => $user_count['total_users'], + 'multisite_enabled' => $multisite_enabled + ); + + $url = 'http://api.wordpress.org/core/version-check/1.6/?' . http_build_query( $query, null, '&' ); $options = array( 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),