mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Limit pingback response size. fixes #4137. for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@24871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
93ca609f53
commit
7f12e16e47
@ -5389,7 +5389,13 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
sleep(1);
|
||||
|
||||
// Let's check the remote site
|
||||
$linea = wp_remote_retrieve_body( wp_remote_get( $pagelinkedfrom, array( 'timeout' => 10, 'redirection' => 0, 'reject_unsafe_urls' => true ) ) );
|
||||
$http_api_args = array(
|
||||
'timeout' => 10,
|
||||
'redirection' => 0,
|
||||
'reject_unsafe_urls' => true,
|
||||
'limit_response_size' => 153600, // 150 KB
|
||||
);
|
||||
$linea = wp_remote_retrieve_body( wp_remote_get( $pagelinkedfrom, $http_api_args ) );
|
||||
|
||||
if ( !$linea )
|
||||
return $this->pingback_error( 16, __( 'The source URL does not exist.' ) );
|
||||
|
Loading…
Reference in New Issue
Block a user