Version Description
- Add new feature fix hotlinks
- Change notif timing
Download this release
Release Info
Developer | aminnz |
Plugin | Disable XML-RPC-API |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- admin/admin.php +2 -2
- disable-xml-rpc-api.php +26 -3
- lib/skelet/framework.config.php +7 -1
- readme.txt +6 -2
admin/admin.php
CHANGED
@@ -14,12 +14,12 @@ function dsxmlrpc_action_links($links) {
|
|
14 |
}
|
15 |
|
16 |
function dsxmlrpc_admin_notice_wpsg() {
|
17 |
-
if ( ! PAnD::is_admin_notice_active( 'dsxmlrpc-wpsg-notice-
|
18 |
return;
|
19 |
}
|
20 |
|
21 |
?>
|
22 |
-
<div data-dismissible="dsxmlrpc-wpsg-notice-
|
23 |
<img src="<?=DSXMLRPC_URL?>/admin/logo-icon.png" style="float:left; margin:10px 20px 10px 10px" width="100">
|
24 |
<h2>You can improve your website security by using WP Security Guard!</h2>
|
25 |
<div class="dsxmlrpc-wpsg-notice-innner">
|
14 |
}
|
15 |
|
16 |
function dsxmlrpc_admin_notice_wpsg() {
|
17 |
+
if ( ! PAnD::is_admin_notice_active( 'dsxmlrpc-wpsg-notice-forever' ) ) {
|
18 |
return;
|
19 |
}
|
20 |
|
21 |
?>
|
22 |
+
<div data-dismissible="dsxmlrpc-wpsg-notice-forever" id="dsxmlrpc-wpsg-notice" class="notice notice-warning is-dismissible">
|
23 |
<img src="<?=DSXMLRPC_URL?>/admin/logo-icon.png" style="float:left; margin:10px 20px 10px 10px" width="100">
|
24 |
<h2>You can improve your website security by using WP Security Guard!</h2>
|
25 |
<div class="dsxmlrpc-wpsg-notice-innner">
|
disable-xml-rpc-api.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Plugin Name: Disable XML-RPC-API
|
4 |
Plugin URI: https://neatma.com/dsxmlrpc-plugin/
|
5 |
Description: Lightweight plugin to disable XML-RPC API and Pingbacks,Trackbacks for faster and more secure website.
|
6 |
-
Version: 2.1.
|
7 |
-
Tested up to: 5.
|
8 |
Requires at least: 3.5
|
9 |
Author: Neatma
|
10 |
Author URI: https://neatma.com/
|
@@ -339,6 +339,10 @@ function dsxmlrpc_cur_page(){
|
|
339 |
add_filter( 'script_loader_src', 'dsxmlrpc_remove_ver_param' );
|
340 |
add_filter( 'style_loader_src', 'dsxmlrpc_remove_ver_param' );
|
341 |
}
|
|
|
|
|
|
|
|
|
342 |
/**
|
343 |
* Remove the WordPress version info url parameter.
|
344 |
*/
|
@@ -356,4 +360,23 @@ function dsxmlrpc_cur_page(){
|
|
356 |
*/
|
357 |
function dsxmlrpc_disable_oembed() {
|
358 |
wp_dequeue_script( 'wp-embed' );
|
359 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Plugin Name: Disable XML-RPC-API
|
4 |
Plugin URI: https://neatma.com/dsxmlrpc-plugin/
|
5 |
Description: Lightweight plugin to disable XML-RPC API and Pingbacks,Trackbacks for faster and more secure website.
|
6 |
+
Version: 2.1.1
|
7 |
+
Tested up to: 5.8
|
8 |
Requires at least: 3.5
|
9 |
Author: Neatma
|
10 |
Author URI: https://neatma.com/
|
339 |
add_filter( 'script_loader_src', 'dsxmlrpc_remove_ver_param' );
|
340 |
add_filter( 'style_loader_src', 'dsxmlrpc_remove_ver_param' );
|
341 |
}
|
342 |
+
/* Fix Hotlink in images. */
|
343 |
+
if ( dsxmlrpc_get_option('hotlink-fix') ) {
|
344 |
+
add_action('admin_init', 'dsxmlrpc_hotlinkfix' );
|
345 |
+
}
|
346 |
/**
|
347 |
* Remove the WordPress version info url parameter.
|
348 |
*/
|
360 |
*/
|
361 |
function dsxmlrpc_disable_oembed() {
|
362 |
wp_dequeue_script( 'wp-embed' );
|
363 |
+
}
|
364 |
+
|
365 |
+
|
366 |
+
|
367 |
+
function dsxmlrpc_hotlinkfix() {
|
368 |
+
|
369 |
+
$home_url = get_home_url();
|
370 |
+
|
371 |
+
$htaccess_code = '
|
372 |
+
RewriteEngine on
|
373 |
+
RewriteCond %{HTTP_REFERER} !^$
|
374 |
+
RewriteCond %{HTTP_REFERER} !^'. $home_url .' [NC]
|
375 |
+
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
|
376 |
+
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] ';
|
377 |
+
|
378 |
+
dsxmlrpc_file_chmod();
|
379 |
+
insert_with_markers(DSXMLRPC_HOME_PATH . '.htaccess' , 'DS-XML-RPC-FIX-HOTLINK', $htaccess_code);
|
380 |
+
dsxmlrpc_file_protect();
|
381 |
+
|
382 |
+
}
|
lib/skelet/framework.config.php
CHANGED
@@ -273,13 +273,19 @@ Back in 2013, attackers sent Pingback requests through xmlrpc.php of approximate
|
|
273 |
'icon' => 'fas fa-tachometer-alt',
|
274 |
'title' => 'Speed Up WordPress',
|
275 |
'fields' => array(
|
276 |
-
/* Enable comments antispam */
|
277 |
array(
|
278 |
'id' => 'slow-heartbeat',
|
279 |
'type' => 'switcher',
|
280 |
'title' => 'Heartbeat Slowdown',
|
281 |
'desc' => 'Heartbeat can use a lot of resources and slow down you website',
|
282 |
'default' => true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
),
|
284 |
array(
|
285 |
'id' => 'remove-emojis',
|
273 |
'icon' => 'fas fa-tachometer-alt',
|
274 |
'title' => 'Speed Up WordPress',
|
275 |
'fields' => array(
|
|
|
276 |
array(
|
277 |
'id' => 'slow-heartbeat',
|
278 |
'type' => 'switcher',
|
279 |
'title' => 'Heartbeat Slowdown',
|
280 |
'desc' => 'Heartbeat can use a lot of resources and slow down you website',
|
281 |
'default' => true,
|
282 |
+
), array(
|
283 |
+
'id' => 'hotlink-fix',
|
284 |
+
'type' => 'switcher',
|
285 |
+
'title' => 'Hotlink Fix',
|
286 |
+
'desc' => 'Disable Hotlinking and Leaching of Your Content',
|
287 |
+
'help' => 'disable hotlinking of images with forbidden or custom image option',
|
288 |
+
'default' => true,
|
289 |
),
|
290 |
array(
|
291 |
'id' => 'remove-emojis',
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Contributors: aminnz,neatmarketing
|
|
6 |
Description: Simple plugin to disable XML-RPC API and X-Pingback for faster and more secure website.
|
7 |
Tags: disable xml-rpc, disable xmlrpc,remove xmlrpc, XML-RPC, pingback, stop brute force attacks
|
8 |
Version: 2.1.0
|
9 |
-
Tested up to: 5.
|
10 |
Requires at least: 3.5
|
11 |
Author: Neatma
|
12 |
Author URI: https://neatma.com
|
@@ -133,4 +133,8 @@ screenshot-2.jpg
|
|
133 |
*Major Update
|
134 |
*Add "XML-RPC Security"settings menu
|
135 |
*Add some new features
|
136 |
-
*Fix plugin deactivation bug
|
|
|
|
|
|
|
|
6 |
Description: Simple plugin to disable XML-RPC API and X-Pingback for faster and more secure website.
|
7 |
Tags: disable xml-rpc, disable xmlrpc,remove xmlrpc, XML-RPC, pingback, stop brute force attacks
|
8 |
Version: 2.1.0
|
9 |
+
Tested up to: 5.8
|
10 |
Requires at least: 3.5
|
11 |
Author: Neatma
|
12 |
Author URI: https://neatma.com
|
133 |
*Major Update
|
134 |
*Add "XML-RPC Security"settings menu
|
135 |
*Add some new features
|
136 |
+
*Fix plugin deactivation bug
|
137 |
+
|
138 |
+
= 2.1.1 =
|
139 |
+
* Add new feature fix hotlinks
|
140 |
+
* Change notif timing
|