Version Description
- Added code to remove X-Pingback from HTTP headers as suggested by user https://wordpress.org/support/topic/remove-x-pingback-http-header
Download this release
Release Info
Developer | samuelaguilera |
Plugin | Disable XML-RPC Pingback |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- disable-xml-rpc-pingback.php +10 -3
- readme.txt +8 -2
disable-xml-rpc-pingback.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Disable XML-RPC Pingback
|
4 |
Description: Stops abuse of your site's Pingback method from XML-RPC by simply removing it. While you can use the rest of XML-RPC methods.
|
5 |
Author: Samuel Aguilera
|
6 |
-
Version: 1.
|
7 |
Author URI: http://www.samuelaguilera.com
|
8 |
License: GPL2
|
9 |
*/
|
@@ -22,12 +22,19 @@ You should have received a copy of the GNU General Public License
|
|
22 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
23 |
*/
|
24 |
|
25 |
-
add_filter( 'xmlrpc_methods', '
|
26 |
|
27 |
-
function
|
28 |
unset( $methods['pingback.ping'] );
|
29 |
unset( $methods['pingback.extensions.getPingbacks'] );
|
30 |
return $methods;
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
?>
|
3 |
Plugin Name: Disable XML-RPC Pingback
|
4 |
Description: Stops abuse of your site's Pingback method from XML-RPC by simply removing it. While you can use the rest of XML-RPC methods.
|
5 |
Author: Samuel Aguilera
|
6 |
+
Version: 1.1
|
7 |
Author URI: http://www.samuelaguilera.com
|
8 |
License: GPL2
|
9 |
*/
|
22 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
23 |
*/
|
24 |
|
25 |
+
add_filter( 'xmlrpc_methods', 'sar_block_xmlrpc_attacks' );
|
26 |
|
27 |
+
function sar_block_xmlrpc_attacks( $methods ) {
|
28 |
unset( $methods['pingback.ping'] );
|
29 |
unset( $methods['pingback.extensions.getPingbacks'] );
|
30 |
return $methods;
|
31 |
}
|
32 |
|
33 |
+
add_filter( 'wp_headers', 'sar_remove_x_pingback_header' );
|
34 |
+
|
35 |
+
function sar_remove_x_pingback_header( $headers ) {
|
36 |
+
unset( $headers['X-Pingback'] );
|
37 |
+
return $headers;
|
38 |
+
}
|
39 |
+
|
40 |
?>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: samuelaguilera
|
3 |
Tags: xml-rpc, xml, rpc, pingback, ddos, firewall
|
4 |
Requires at least: 3.8.1
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -22,6 +22,8 @@ Removes the following methods from XML-RPC interface.
|
|
22 |
* pingback.ping
|
23 |
* pingback.extensions.getPingbacks
|
24 |
|
|
|
|
|
25 |
= Requirements =
|
26 |
|
27 |
* WordPress 3.8.1 or higher.
|
@@ -33,6 +35,10 @@ Removes the following methods from XML-RPC interface.
|
|
33 |
|
34 |
== Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
36 |
= 1.0 =
|
37 |
|
38 |
* Initial release.
|
2 |
Contributors: samuelaguilera
|
3 |
Tags: xml-rpc, xml, rpc, pingback, ddos, firewall
|
4 |
Requires at least: 3.8.1
|
5 |
+
Tested up to: 4.8.3
|
6 |
+
Stable tag: 1.1
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
22 |
* pingback.ping
|
23 |
* pingback.extensions.getPingbacks
|
24 |
|
25 |
+
Also removes X-Pingback from HTTP headers. This will hopefully stops some bots from trying to hit your xmlrpc.php file.
|
26 |
+
|
27 |
= Requirements =
|
28 |
|
29 |
* WordPress 3.8.1 or higher.
|
35 |
|
36 |
== Changelog ==
|
37 |
|
38 |
+
= 1.1 =
|
39 |
+
|
40 |
+
* Added code to remove X-Pingback from HTTP headers as suggested by user https://wordpress.org/support/topic/remove-x-pingback-http-header
|
41 |
+
|
42 |
= 1.0 =
|
43 |
|
44 |
* Initial release.
|