Make WordPress Core

Changeset 27878 for branches/3.7/src


Ignore:
Timestamp:
03/31/2014 09:35:42 PM (10 years ago)
Author:
nacin
Message:

Forward pingback IP during pingback verification.

Merges [27872] to the 3.7 branch.

props tellyworth, nacin.
fixes #27613.

Location:
branches/3.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src/wp-includes/class-wp-xmlrpc-server.php

    r25133 r27878  
    53925392        sleep(1);
    53935393
     5394        $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
     5395        $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . $GLOBALS['wp_version'] . '; ' . get_bloginfo( 'url' ) );
     5396
    53945397        // Let's check the remote site
    53955398        $http_api_args = array(
     
    53975400            'redirection' => 0,
    53985401            'limit_response_size' => 153600, // 150 KB
     5402            'user-agent' => "$user_agent; verifying pingback from $remote_ip",
     5403            'headers' => array(
     5404                'X-Pingback-Forwarded-For' => $remote_ip,
     5405            ),
    53995406        );
    54005407        $linea = wp_remote_retrieve_body( wp_safe_remote_get( $pagelinkedfrom, $http_api_args ) );
Note: See TracChangeset for help on using the changeset viewer.