|
@@ 599-606 (lines=8) @@
|
| 596 |
|
// Hack to preserve $HTTP_RAW_POST_DATA |
| 597 |
|
add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ) ); |
| 598 |
|
|
| 599 |
|
if ( $this->verify_xml_rpc_signature() ) { |
| 600 |
|
// The actual API methods. |
| 601 |
|
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'xmlrpc_methods' ) ); |
| 602 |
|
} else { |
| 603 |
|
// The jetpack.authorize method should be available for unauthenticated users on a site with an |
| 604 |
|
// active Jetpack connection, so that additional users can link their account. |
| 605 |
|
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'authorize_xmlrpc_methods' ) ); |
| 606 |
|
} |
| 607 |
|
} else { |
| 608 |
|
new XMLRPC_Connector( $this->connection_manager ); |
| 609 |
|
|
|
@@ 607-617 (lines=11) @@
|
| 604 |
|
// active Jetpack connection, so that additional users can link their account. |
| 605 |
|
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'authorize_xmlrpc_methods' ) ); |
| 606 |
|
} |
| 607 |
|
} else { |
| 608 |
|
new XMLRPC_Connector( $this->connection_manager ); |
| 609 |
|
|
| 610 |
|
// The bootstrap API methods. |
| 611 |
|
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'bootstrap_xmlrpc_methods' ) ); |
| 612 |
|
|
| 613 |
|
if ( $this->verify_xml_rpc_signature() ) { |
| 614 |
|
// the jetpack Provision method is available for blog-token-signed requests |
| 615 |
|
add_filter( 'xmlrpc_methods', array( $this->xmlrpc_server, 'provision_xmlrpc_methods' ) ); |
| 616 |
|
} |
| 617 |
|
} |
| 618 |
|
|
| 619 |
|
// Now that no one can authenticate, and we're whitelisting all XML-RPC methods, force enable_xmlrpc on. |
| 620 |
|
add_filter( 'pre_option_enable_xmlrpc', '__return_true' ); |