Plugin yìí kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress. Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

REST XML-RPC Data Checker

Àpèjúwe

JSON REST API and XML-RPC API are powerful ways to remotely interact with WordPress.

If you donÌtumọ̀ Yorùbá: ’t have external applications that need to communicate with your WordPress instance using JSON REST API or XML-RPC API you should disable access to them for external requests.

In the standard WordPress installation JSON REST API and XML-RPC API are enabled by default.
In particular the REST API is turned on also for unlogged users. This means that your WordPress instance is potentially leaking data, for example anyone could be able to:

  • copy easily your published contents natively with the REST API (and not with a web crawler);
  • get the list of all users (with their ID, nickname and name);
  • retrieve other information that you didnÌtumọ̀ Yorùbá: ’t want to be public (such as an unlisted published page or a saved media not yet used).

Even if you could do the stuff by writing your own code using native filters, this plugin aims to help you to control JSON REST API and XML-RPC API accesses from the administration panel or programmatically by a simple API filter.

Basic Features

  • Disable REST API interface for unlogged users.
  • Disable JSONP support on REST API.
  • Add Basic Authentication to REST API.
  • Remove REST <link> tags, REST Link HTTP header and REST Really Simple Discovery (RSD) informations.
  • Setup trusted users, IP/Networks and endpoints for unlogged users REST requests.
  • Change REST endpoint prefix.
  • Disable XML-RPC API interface.
  • Remove <link> to the Really Simple Discovery (RDS) informations.
  • Remove X-Pingback HTTP header.
  • Setup trusted users, IP/Networks and methods for XML-RPC requests.
  • Show userÌtumọ̀ Yorùbá: ’s access informations in users list administration screen.

Usage

Once the plugin is installed you can control settings in the following ways:

  • Using the Settings->REST XML-RPC Data Checker administration screen.
  • Programmatically, by using rest_xmlrpc_data_checker_settings filter (see below).

API

Hooks

rest_xmlrpc_data_checker_settings

Filters plugin settings values.

apply_filters( 'rest_xmlrpc_data_checker_settings', array $settings )

rest_xmlrpc_data_checker_admin_settings

Filter allowing to display or not the plugin settings page in the administration.

apply_filters( 'rest_xmlrpc_data_checker_admin_settings', boolean $display )

rest_xmlrpc_data_checker_rest_error

Filter JSON REST authentication error after plugin checks.

apply_filters( 'rest_xmlrpc_data_checker_rest_error', WP_Error|boolean $result )

xmlrpc_before_insert_post

Filter XML-RPC post data to be inserted via XML-RPC before to insert post into database.

apply_filters( 'xmlrpc_before_insert_post', array|IXR_Error $content_struct, WP_User $user )

Àwọn àwòrán ìbòjú

Ìgbéwọlẹ̀

This section describes how to install the plugin and get it working.

  1. Upload the plugin files to the /wp-content/plugins/rest-xmlrpc-data-checker directory, or install the plugin through the WordPress Plugins screen directly.
  2. Activate the plugin through the Plugins screen in WordPress.

FAQ

Does it work with Gutenberg?

Yes

Does it work on Multisite?

Yes

How do I make REST requests using Basic Authentication?

In the REST tab of plugin settings page you have to:

  • check Disable REST API interface for unlogged users option
  • select Use Basic Authentication in the Authentication section
  • select users whom you want to grant REST access
  • save changes

This way, in HTTP REST external requests, users have to add Authorization HTTP header.

In order to generate the Authorization HTTP header to use with Basic Authentication you simply have to base64 encode the username and password separated by a colon.

Here is an example in PHP:

$header = 'Authorization: Basic ' . base64_encode( 'my-user:my-password' );

Here you can see several examples in a variety of language.

Note that the Basic Authentication requires sending your username and password with every request, and should only be used over SSL-secured connections or for local development and testing.
Without SSL you are strongly encouraged to to turn off Basic Authentication in production environments.

Àwọn àgbéyẹ̀wò

Bélú 25, 2022
A very useful plugin that works well. The plugin helped close access to the JSON REST API for unregistered users, and also nullified attacks on XML-RPC!
Èrèlé 24, 2021
Having more options that I expected (i.e. enable/disable on user level). Thanks for nice plugin.
Ka gbogbo àwọn àgbéyẹ̀wò 3

Àwọn Olùkópa & Olùgbéejáde

“REST XML-RPC Data Checker” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

Túmọ̀ “REST XML-RPC Data Checker” sí èdè rẹ.

Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.

Àkọsílẹ̀ àwọn àyípadà

For REST XML-RPC Data Checker changelog, please see the Releases page on GitHub.