WordPress.org

Make WordPress Core

Changeset 27872


Ignore:
Timestamp:
03/31/14 20:42:41 (4 years ago)
Author:
nacin
Message:

Forward pingback IP during pingback verification.

props tellyworth, nacin.
fixes #27613.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r27730 r27872  
    57895789        sleep(1); 
    57905790 
     5791        $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ); 
     5792        $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . $GLOBALS['wp_version'] . '; ' . get_bloginfo( 'url' ) ); 
     5793 
    57915794        // Let's check the remote site 
    57925795        $http_api_args = array( 
     
    57945797            'redirection' => 0, 
    57955798            'limit_response_size' => 153600, // 150 KB 
     5799            'user-agent' => "$user_agent; verifying pingback from $remote_ip", 
     5800            'headers' => array( 
     5801                'X-Pingback-Forwarded-For' => $remote_ip, 
     5802            ), 
    57965803        ); 
    57975804        $linea = wp_remote_retrieve_body( wp_safe_remote_get( $pagelinkedfrom, $http_api_args ) ); 
Note: See TracChangeset for help on using the changeset viewer.