Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai
noblogs-wp
Commits
f4f5cecd
Commit
f4f5cecd
authored
Feb 27, 2011
by
root
Committed by
agata
Oct 17, 2019
Browse files
anonymize user-agent and don't send some headers when checking for updates
parent
5ea83e10
Changes
1
Hide whitespace changes
Inline
Side-by-side
wp-includes/update.php
View file @
f4f5cecd
...
...
@@ -140,11 +140,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
,
);
...
...
@@ -361,7 +361,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
)
{
...
...
@@ -546,7 +546,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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment