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:
Andrew Nacin 2013-07-29 18:00:06 +00:00
parent 93ca609f53
commit 7f12e16e47
1 changed files with 7 additions and 1 deletions

View File

@ -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.' ) );