Version Description
- Post type fetch improvement.
- Handing wing version for ipstore wing.
- Making Login Protection more configurable.
- Robust handling of requests params.
- Callback wing versioning.
Download this release
Release Info
Developer | ritesh.soni36 |
Plugin | WordPress Backup & Security Plugin – BlogVault |
Version | 4.66 |
Comparing to | |
See all releases |
Code changes from version 4.64 to 4.66
- blogvault.php +3 -1
- callback/base.php +17 -0
- callback/request.php +47 -0
- callback/wings/account.php +2 -0
- callback/wings/actlog.php +2 -0
- callback/wings/brand.php +2 -0
- callback/wings/bv_upgrader_skin.php +2 -0
- callback/wings/db.php +2 -0
- callback/wings/dynsync.php +2 -0
- callback/wings/fs.php +1 -0
- callback/wings/fs_write.php +1 -0
- callback/wings/info.php +4 -2
- callback/wings/ipstore.php +2 -0
- callback/wings/manage.php +2 -0
- callback/wings/misc.php +68 -0
- callback/wings/protect.php +2 -0
- callback/wings/watch.php +2 -0
- info.php +1 -1
- protect/wp/lp/config.php +6 -0
- protect/wp/lp/lp.php +15 -3
- readme.txt +8 -1
blogvault.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://blogvault.net
|
|
5 |
Description: Easiest way to backup & secure your WordPress site
|
6 |
Author: Backup by BlogVault
|
7 |
Author URI: https://blogvault.net
|
8 |
-
Version: 4.
|
9 |
Network: True
|
10 |
*/
|
11 |
|
@@ -28,6 +28,7 @@ Network: True
|
|
28 |
/* Global response array */
|
29 |
|
30 |
if (!defined('ABSPATH')) exit;
|
|
|
31 |
|
32 |
require_once dirname( __FILE__ ) . '/wp_settings.php';
|
33 |
require_once dirname( __FILE__ ) . '/wp_site_info.php';
|
@@ -99,6 +100,7 @@ if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "
|
|
99 |
|
100 |
|
101 |
require_once dirname( __FILE__ ) . '/callback/handler.php';
|
|
|
102 |
$params = $request->processParams($_REQUEST);
|
103 |
if ($params === false) {
|
104 |
$resp = array(
|
5 |
Description: Easiest way to backup & secure your WordPress site
|
6 |
Author: Backup by BlogVault
|
7 |
Author URI: https://blogvault.net
|
8 |
+
Version: 4.66
|
9 |
Network: True
|
10 |
*/
|
11 |
|
28 |
/* Global response array */
|
29 |
|
30 |
if (!defined('ABSPATH')) exit;
|
31 |
+
##OLDWPR##
|
32 |
|
33 |
require_once dirname( __FILE__ ) . '/wp_settings.php';
|
34 |
require_once dirname( __FILE__ ) . '/wp_site_info.php';
|
100 |
|
101 |
|
102 |
require_once dirname( __FILE__ ) . '/callback/handler.php';
|
103 |
+
|
104 |
$params = $request->processParams($_REQUEST);
|
105 |
if ($params === false) {
|
106 |
$resp = array(
|
callback/base.php
CHANGED
@@ -4,6 +4,23 @@ if (!defined('ABSPATH')) exit;
|
|
4 |
if (!class_exists('BVCallbackBase')) :
|
5 |
|
6 |
class BVCallbackBase {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
public function objectToArray($obj) {
|
8 |
return json_decode(json_encode($obj), true);
|
9 |
}
|
4 |
if (!class_exists('BVCallbackBase')) :
|
5 |
|
6 |
class BVCallbackBase {
|
7 |
+
|
8 |
+
const WING_INFOS = array("MANAGE_WING_VERSION" => '1.0',
|
9 |
+
"ACTLOG_WING_VERSION" => '1.0',
|
10 |
+
"DYNSYNC_WING_VERSION" => '1.0',
|
11 |
+
"UPGRADER_WING_VERSION" => '1.0',
|
12 |
+
"BRAND_WING_VERSION" => '1.0',
|
13 |
+
"DB_WING_VERSION" => '1.0',
|
14 |
+
"ACCOUNT_WING_VERSION" => '1.0',
|
15 |
+
"MISC_WING_VERSION" => '1.0',
|
16 |
+
"FS_WING_VERSION" => '1.0',
|
17 |
+
"INFO_WING_VERSION" => '1.0',
|
18 |
+
"WATCH_WING_VERSION" => '1.0',
|
19 |
+
"FS_WRITE_WING_VERSION" => '1.0',
|
20 |
+
"IPSTORE_WING_VERSION" => '1.0',
|
21 |
+
"PROTECT_WING_VERSION" => '1.0',
|
22 |
+
);
|
23 |
+
|
24 |
public function objectToArray($obj) {
|
25 |
return json_decode(json_encode($obj), true);
|
26 |
}
|
callback/request.php
CHANGED
@@ -40,6 +40,46 @@ if (!class_exists('BVCallbackRequest')) :
|
|
40 |
return array_key_exists('apicall', $this->params);
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
public function info() {
|
44 |
$info = array(
|
45 |
"requestedsig" => $this->sig,
|
@@ -81,6 +121,13 @@ if (!class_exists('BVCallbackRequest')) :
|
|
81 |
}
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
if (array_key_exists('bvprms', $in_params) && isset($in_params['bvprms']) &&
|
85 |
array_key_exists('bvprmsmac', $in_params) && isset($in_params['bvprmsmac'])) {
|
86 |
$digest_algo = 'SHA1';
|
40 |
return array_key_exists('apicall', $this->params);
|
41 |
}
|
42 |
|
43 |
+
public function curlRequest($url, $body) {
|
44 |
+
$ch = curl_init($url);
|
45 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
46 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
|
47 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($body));
|
48 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
49 |
+
return curl_exec($ch);
|
50 |
+
}
|
51 |
+
|
52 |
+
public function fileGetContentRequest($url, $body) {
|
53 |
+
$options = array(
|
54 |
+
'http' => array(
|
55 |
+
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
56 |
+
'method' => 'POST',
|
57 |
+
'content' => http_build_query($body)
|
58 |
+
)
|
59 |
+
);
|
60 |
+
|
61 |
+
$context = stream_context_create($options);
|
62 |
+
return file_get_contents($url, false, $context);
|
63 |
+
}
|
64 |
+
|
65 |
+
public function http_request($url, $body) {
|
66 |
+
if (in_array('curl', get_loaded_extensions())) {
|
67 |
+
return $this->curlRequest($url, $body);
|
68 |
+
} else {
|
69 |
+
return $this->fileGetContentRequest($url, $body);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
public function get_params_via_api($params_key, $apiurl) {
|
74 |
+
$res = $this->http_request($apiurl, array('bvkey' => $params_key));
|
75 |
+
|
76 |
+
if ($res === FALSE) {
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
|
80 |
+
return $res;
|
81 |
+
}
|
82 |
+
|
83 |
public function info() {
|
84 |
$info = array(
|
85 |
"requestedsig" => $this->sig,
|
121 |
}
|
122 |
}
|
123 |
|
124 |
+
if (isset($in_params['bvpdataviaapi']) && isset($in_params['bvapiurl'])) {
|
125 |
+
$pdata = $this->get_params_via_api($in_params['bvpdataviaapi'], $in_params['bvapiurl']);
|
126 |
+
if ($pdata !== false) {
|
127 |
+
$in_params["bvprms"] = $pdata;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
if (array_key_exists('bvprms', $in_params) && isset($in_params['bvprms']) &&
|
132 |
array_key_exists('bvprmsmac', $in_params) && isset($in_params['bvprmsmac'])) {
|
133 |
$digest_algo = 'SHA1';
|
callback/wings/account.php
CHANGED
@@ -5,6 +5,8 @@ if (!class_exists('BVAccountCallback')) :
|
|
5 |
class BVAccountCallback extends BVCallbackBase {
|
6 |
public $account;
|
7 |
public $settings;
|
|
|
|
|
8 |
|
9 |
public function __construct($callback_handler) {
|
10 |
$this->account = $callback_handler->account;
|
5 |
class BVAccountCallback extends BVCallbackBase {
|
6 |
public $account;
|
7 |
public $settings;
|
8 |
+
|
9 |
+
const ACCOUNT_WING_VERSION = 1.0;
|
10 |
|
11 |
public function __construct($callback_handler) {
|
12 |
$this->account = $callback_handler->account;
|
callback/wings/actlog.php
CHANGED
@@ -9,6 +9,8 @@ class BVActLogCallback extends BVCallbackBase {
|
|
9 |
public $db;
|
10 |
public $settings;
|
11 |
|
|
|
|
|
12 |
public function __construct($callback_handler) {
|
13 |
$this->db = $callback_handler->db;
|
14 |
$this->settings = $callback_handler->settings;
|
9 |
public $db;
|
10 |
public $settings;
|
11 |
|
12 |
+
const ACTLOG_WING_VERSION = 1.0;
|
13 |
+
|
14 |
public function __construct($callback_handler) {
|
15 |
$this->db = $callback_handler->db;
|
16 |
$this->settings = $callback_handler->settings;
|
callback/wings/brand.php
CHANGED
@@ -6,6 +6,8 @@ if (!class_exists('BVBrandCallback')) :
|
|
6 |
class BVBrandCallback extends BVCallbackBase {
|
7 |
public $settings;
|
8 |
|
|
|
|
|
9 |
public function __construct($callback_handler) {
|
10 |
$this->settings = $callback_handler->settings;
|
11 |
}
|
6 |
class BVBrandCallback extends BVCallbackBase {
|
7 |
public $settings;
|
8 |
|
9 |
+
const BRAND_WING_VERSION = 1.0;
|
10 |
+
|
11 |
public function __construct($callback_handler) {
|
12 |
$this->settings = $callback_handler->settings;
|
13 |
}
|
callback/wings/bv_upgrader_skin.php
CHANGED
@@ -9,6 +9,8 @@ class BVUpgraderSkin extends WP_Upgrader_Skin {
|
|
9 |
public $theme_info = array();
|
10 |
public $language_update = null;
|
11 |
|
|
|
|
|
12 |
function __construct($type, $package = '') {
|
13 |
$this->action = $type;
|
14 |
$this->package = $package;
|
9 |
public $theme_info = array();
|
10 |
public $language_update = null;
|
11 |
|
12 |
+
const UPGRADER_WING_VERSION = 1.0;
|
13 |
+
|
14 |
function __construct($type, $package = '') {
|
15 |
$this->action = $type;
|
16 |
$this->package = $package;
|
callback/wings/db.php
CHANGED
@@ -11,6 +11,8 @@ class BVDBCallback extends BVCallbackBase {
|
|
11 |
|
12 |
public static $bvTables = array("fw_requests", "lp_requests", "ip_store");
|
13 |
|
|
|
|
|
14 |
public function __construct($callback_handler) {
|
15 |
$this->db = $callback_handler->db;
|
16 |
$this->account = $callback_handler->account;
|
11 |
|
12 |
public static $bvTables = array("fw_requests", "lp_requests", "ip_store");
|
13 |
|
14 |
+
const DB_WING_VERSION = 1.0;
|
15 |
+
|
16 |
public function __construct($callback_handler) {
|
17 |
$this->db = $callback_handler->db;
|
18 |
$this->account = $callback_handler->account;
|
callback/wings/dynsync.php
CHANGED
@@ -9,6 +9,8 @@ class BVDynSyncCallback extends BVCallbackBase {
|
|
9 |
public $db;
|
10 |
public $settings;
|
11 |
|
|
|
|
|
12 |
public function __construct($callback_handler) {
|
13 |
$this->db = $callback_handler->db;
|
14 |
$this->settings = $callback_handler->settings;
|
9 |
public $db;
|
10 |
public $settings;
|
11 |
|
12 |
+
const DYNSYNC_WING_VERSION = 1.0;
|
13 |
+
|
14 |
public function __construct($callback_handler) {
|
15 |
$this->db = $callback_handler->db;
|
16 |
$this->settings = $callback_handler->settings;
|
callback/wings/fs.php
CHANGED
@@ -9,6 +9,7 @@ class BVFSCallback extends BVCallbackBase {
|
|
9 |
public $account;
|
10 |
|
11 |
public static $cwAllowedFiles = array(".htaccess", ".user.ini", "malcare-waf.php");
|
|
|
12 |
|
13 |
public function __construct($callback_handler) {
|
14 |
$this->account = $callback_handler->account;
|
9 |
public $account;
|
10 |
|
11 |
public static $cwAllowedFiles = array(".htaccess", ".user.ini", "malcare-waf.php");
|
12 |
+
const FS_WING_VERSION = 1.0;
|
13 |
|
14 |
public function __construct($callback_handler) {
|
15 |
$this->account = $callback_handler->account;
|
callback/wings/fs_write.php
CHANGED
@@ -6,6 +6,7 @@ if (!class_exists('BVFSWriteCallback')) :
|
|
6 |
class BVFSWriteCallback extends BVCallbackBase {
|
7 |
|
8 |
const MEGABYTE = 1048576;
|
|
|
9 |
|
10 |
public function __construct() {
|
11 |
}
|
6 |
class BVFSWriteCallback extends BVCallbackBase {
|
7 |
|
8 |
const MEGABYTE = 1048576;
|
9 |
+
const FS_WRITE_WING_VERSION = 1.0;
|
10 |
|
11 |
public function __construct() {
|
12 |
}
|
callback/wings/info.php
CHANGED
@@ -8,6 +8,8 @@ class BVInfoCallback extends BVCallbackBase {
|
|
8 |
public $settings;
|
9 |
public $siteinfo;
|
10 |
public $bvinfo;
|
|
|
|
|
11 |
|
12 |
public function __construct($callback_handler) {
|
13 |
$this->db = $callback_handler->db;
|
@@ -156,7 +158,7 @@ class BVInfoCallback extends BVCallbackBase {
|
|
156 |
return array("wp" => $wp_info);
|
157 |
}
|
158 |
|
159 |
-
public function getUsers($args = array()
|
160 |
$results = array();
|
161 |
$users = get_users($args);
|
162 |
if ('true' == $full) {
|
@@ -301,7 +303,7 @@ class BVInfoCallback extends BVCallbackBase {
|
|
301 |
$full = false;
|
302 |
if (array_key_exists('full', $params))
|
303 |
$full = true;
|
304 |
-
$resp = $this->getUsers($params['args']
|
305 |
break;
|
306 |
case "gttrnsnt":
|
307 |
$transient = $this->settings->getTransient($params['name']);
|
8 |
public $settings;
|
9 |
public $siteinfo;
|
10 |
public $bvinfo;
|
11 |
+
|
12 |
+
const INFO_WING_VERSION = 1.0;
|
13 |
|
14 |
public function __construct($callback_handler) {
|
15 |
$this->db = $callback_handler->db;
|
158 |
return array("wp" => $wp_info);
|
159 |
}
|
160 |
|
161 |
+
public function getUsers($full, $args = array()) {
|
162 |
$results = array();
|
163 |
$users = get_users($args);
|
164 |
if ('true' == $full) {
|
303 |
$full = false;
|
304 |
if (array_key_exists('full', $params))
|
305 |
$full = true;
|
306 |
+
$resp = $this->getUsers($full, $params['args']);
|
307 |
break;
|
308 |
case "gttrnsnt":
|
309 |
$transient = $this->settings->getTransient($params['name']);
|
callback/wings/ipstore.php
CHANGED
@@ -8,6 +8,8 @@ require_once dirname( __FILE__ ) . '/../../protect/wp/ipstore.php';
|
|
8 |
class BVIPStoreCallback extends BVCallbackBase {
|
9 |
public $db;
|
10 |
|
|
|
|
|
11 |
public function __construct($callback_handler) {
|
12 |
$this->db = $callback_handler->db;
|
13 |
}
|
8 |
class BVIPStoreCallback extends BVCallbackBase {
|
9 |
public $db;
|
10 |
|
11 |
+
const IPSTORE_WING_VERSION = 1.0;
|
12 |
+
|
13 |
public function __construct($callback_handler) {
|
14 |
$this->db = $callback_handler->db;
|
15 |
}
|
callback/wings/manage.php
CHANGED
@@ -6,6 +6,8 @@ class BVManageCallback extends BVCallbackBase {
|
|
6 |
public $settings;
|
7 |
public $skin;
|
8 |
|
|
|
|
|
9 |
public function __construct($callback_handler) {
|
10 |
$this->settings = $callback_handler->settings;
|
11 |
}
|
6 |
public $settings;
|
7 |
public $skin;
|
8 |
|
9 |
+
const MANAGE_WING_VERSION = 1.0;
|
10 |
+
|
11 |
public function __construct($callback_handler) {
|
12 |
$this->settings = $callback_handler->settings;
|
13 |
}
|
callback/wings/misc.php
CHANGED
@@ -9,11 +9,15 @@ class BVMiscCallback extends BVCallbackBase {
|
|
9 |
public $siteinfo;
|
10 |
public $account;
|
11 |
public $bvapi;
|
|
|
|
|
|
|
12 |
|
13 |
public function __construct($callback_handler) {
|
14 |
$this->settings = $callback_handler->settings;
|
15 |
$this->siteinfo = $callback_handler->siteinfo;
|
16 |
$this->account = $callback_handler->account;
|
|
|
17 |
$this->bvinfo = new BVInfo($callback_handler->settings);
|
18 |
$this->bvapi = new BVWPAPI($callback_handler->settings);
|
19 |
}
|
@@ -44,6 +48,54 @@ class BVMiscCallback extends BVCallbackBase {
|
|
44 |
return array("wpupdatethemes" => true);
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
public function process($request) {
|
48 |
$bvinfo = $this->bvinfo;
|
49 |
$settings = $this->settings;
|
@@ -54,6 +106,7 @@ class BVMiscCallback extends BVCallbackBase {
|
|
54 |
$resp = array_merge($resp, $this->siteinfo->info());
|
55 |
$resp = array_merge($resp, $this->account->info());
|
56 |
$resp = array_merge($resp, $this->bvinfo->info());
|
|
|
57 |
break;
|
58 |
case "pngbv":
|
59 |
$info = array();
|
@@ -123,6 +176,21 @@ class BVMiscCallback extends BVCallbackBase {
|
|
123 |
$resp["updated_configs"] = $updated_configs;
|
124 |
$resp["deleted_configs"] = $deleted_configs;
|
125 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
default:
|
127 |
$resp = false;
|
128 |
}
|
9 |
public $siteinfo;
|
10 |
public $account;
|
11 |
public $bvapi;
|
12 |
+
public $db;
|
13 |
+
|
14 |
+
const MISC_WING_VERSION = 1.0;
|
15 |
|
16 |
public function __construct($callback_handler) {
|
17 |
$this->settings = $callback_handler->settings;
|
18 |
$this->siteinfo = $callback_handler->siteinfo;
|
19 |
$this->account = $callback_handler->account;
|
20 |
+
$this->db = $callback_handler->db;
|
21 |
$this->bvinfo = new BVInfo($callback_handler->settings);
|
22 |
$this->bvapi = new BVWPAPI($callback_handler->settings);
|
23 |
}
|
48 |
return array("wpupdatethemes" => true);
|
49 |
}
|
50 |
|
51 |
+
public function getWingInfo() {
|
52 |
+
return array('wing_info' => self::WING_INFOS);
|
53 |
+
}
|
54 |
+
|
55 |
+
public function post_types_data($post_params) {
|
56 |
+
$result = array();
|
57 |
+
$get_post_types_args = $post_params['get_post_types_args'];
|
58 |
+
$post_types = get_post_types($get_post_types_args);
|
59 |
+
$post_types = array_merge($post_types, $post_params['include_post_types']);
|
60 |
+
$post_types = array_diff( $post_types, $post_params['exclude_post_types']);
|
61 |
+
$result['post_types'] = $post_types;
|
62 |
+
$post_types = esc_sql($post_types);
|
63 |
+
$post_types = "'" . implode("','", $post_types) . "'";
|
64 |
+
$post_table = $post_params['table'];
|
65 |
+
$post_select_columns = implode(", ", $post_params['select_column']);
|
66 |
+
$post_query = "SELECT MAX(ID) as $post_select_columns FROM ( SELECT
|
67 |
+
$post_select_columns FROM $post_table WHERE post_type IN ( $post_types )
|
68 |
+
AND post_status='publish' ORDER BY post_date DESC ) AS posts GROUP BY post_type";
|
69 |
+
$posts = $this->db->getResult($post_query);
|
70 |
+
foreach ( $posts as $key => $post ) {
|
71 |
+
$posts[$key]['url'] = get_permalink($post['ID']);
|
72 |
+
}
|
73 |
+
$result['posts'] = $posts;
|
74 |
+
return $result;
|
75 |
+
}
|
76 |
+
|
77 |
+
public function taxonomy_data($taxonomy_params) {
|
78 |
+
$result = array();
|
79 |
+
$get_taxonomies_args = $taxonomy_params['get_taxonomies_args'];
|
80 |
+
$taxonomies = get_taxonomies($get_taxonomies_args);
|
81 |
+
$taxonomies = array_diff($taxonomies, $taxonomy_params['exclude_taxonomies']);
|
82 |
+
$result['taxonomies'] = $taxonomies;
|
83 |
+
$taxonomies = esc_sql( $taxonomies );
|
84 |
+
$taxonomies = "'" . implode( "','", $taxonomies ) . "'";
|
85 |
+
$taxonomy_table = $taxonomy_params['table'];
|
86 |
+
$taxonomy_select_columns = implode(", ", $taxonomy_params['select_column']);
|
87 |
+
$taxonomy_query = "SELECT MAX( term_id ) AS $taxonomy_select_columns FROM (
|
88 |
+
SELECT $taxonomy_select_columns FROM $taxonomy_table WHERE taxonomy IN (
|
89 |
+
$taxonomies ) AND count > 0) AS taxonomies GROUP BY taxonomy";
|
90 |
+
|
91 |
+
$taxonomies = $this->db->getResult($taxonomy_query);
|
92 |
+
foreach($taxonomies as $key => $taxonomy) {
|
93 |
+
$taxonomies[$key]['url'] = get_term_link((int)$taxonomy['term_id'], $taxonomy['taxonomy']);
|
94 |
+
}
|
95 |
+
$result['taxonomy_data'] = $taxonomies;
|
96 |
+
return $result;
|
97 |
+
}
|
98 |
+
|
99 |
public function process($request) {
|
100 |
$bvinfo = $this->bvinfo;
|
101 |
$settings = $this->settings;
|
106 |
$resp = array_merge($resp, $this->siteinfo->info());
|
107 |
$resp = array_merge($resp, $this->account->info());
|
108 |
$resp = array_merge($resp, $this->bvinfo->info());
|
109 |
+
$resp = array_merge($resp, $this->getWingInfo());
|
110 |
break;
|
111 |
case "pngbv":
|
112 |
$info = array();
|
176 |
$resp["updated_configs"] = $updated_configs;
|
177 |
$resp["deleted_configs"] = $deleted_configs;
|
178 |
break;
|
179 |
+
case "critical_css_data":
|
180 |
+
$resp = array();
|
181 |
+
if (array_key_exists('fetch_post_data', $params) && $params['fetch_post_data'] == true) {
|
182 |
+
$post_params = $params['post_params'];
|
183 |
+
$post_result = $this->post_types_data($post_params);
|
184 |
+
$resp['post_cp_results'] = $post_result['posts'];
|
185 |
+
$resp['post_types'] = $post_result['post_types'];
|
186 |
+
}
|
187 |
+
if (array_key_exists('fetch_taxonomy_data', $params) && $params['fetch_taxonomy_data'] == true) {
|
188 |
+
$taxonomy_params = $params['taxonomy_params'];
|
189 |
+
$taxonomy_result = $this->taxonomy_data($taxonomy_params);
|
190 |
+
$resp['taxonomy_cp_results'] = $taxonomy_result['taxonomy_data'];
|
191 |
+
$resp['taxonomies'] = $taxonomy_result['taxonomies'];
|
192 |
+
}
|
193 |
+
break;
|
194 |
default:
|
195 |
$resp = false;
|
196 |
}
|
callback/wings/protect.php
CHANGED
@@ -11,6 +11,8 @@ class BVProtectCallback extends BVCallbackBase {
|
|
11 |
public $db;
|
12 |
public $settings;
|
13 |
|
|
|
|
|
14 |
public function __construct($callback_handler) {
|
15 |
$this->db = $callback_handler->db;
|
16 |
$this->settings = $callback_handler->settings;
|
11 |
public $db;
|
12 |
public $settings;
|
13 |
|
14 |
+
const PROTECT_WING_VERSION = 1.0;
|
15 |
+
|
16 |
public function __construct($callback_handler) {
|
17 |
$this->db = $callback_handler->db;
|
18 |
$this->settings = $callback_handler->settings;
|
callback/wings/watch.php
CHANGED
@@ -7,6 +7,8 @@ class BVWatchCallback extends BVCallbackBase {
|
|
7 |
public $db;
|
8 |
public $settings;
|
9 |
|
|
|
|
|
10 |
public function __construct($callback_handler) {
|
11 |
$this->db = $callback_handler->db;
|
12 |
$this->settings = $callback_handler->settings;
|
7 |
public $db;
|
8 |
public $settings;
|
9 |
|
10 |
+
const WATCH_WING_VERSION = 1.0;
|
11 |
+
|
12 |
public function __construct($callback_handler) {
|
13 |
$this->db = $callback_handler->db;
|
14 |
$this->settings = $callback_handler->settings;
|
info.php
CHANGED
@@ -10,7 +10,7 @@ if (!class_exists('BVInfo')) :
|
|
10 |
public $badgeinfo = 'bvbadge';
|
11 |
public $ip_header_option = 'bvipheader';
|
12 |
public $brand_option = 'bvbrand';
|
13 |
-
public $version = '4.
|
14 |
public $webpage = 'https://blogvault.net';
|
15 |
public $appurl = 'https://app.blogvault.net';
|
16 |
public $slug = 'blogvault-real-time-backup/blogvault.php';
|
10 |
public $badgeinfo = 'bvbadge';
|
11 |
public $ip_header_option = 'bvipheader';
|
12 |
public $brand_option = 'bvbrand';
|
13 |
+
public $version = '4.66';
|
14 |
public $webpage = 'https://blogvault.net';
|
15 |
public $appurl = 'https://app.blogvault.net';
|
16 |
public $slug = 'blogvault-real-time-backup/blogvault.php';
|
protect/wp/lp/config.php
CHANGED
@@ -7,6 +7,9 @@ class BVWPLPConfig {
|
|
7 |
public $captchaLimit;
|
8 |
public $tempBlockLimit;
|
9 |
public $blockAllLimit;
|
|
|
|
|
|
|
10 |
|
11 |
public static $requests_table = 'lp_requests';
|
12 |
|
@@ -20,6 +23,9 @@ class BVWPLPConfig {
|
|
20 |
$this->captchaLimit = array_key_exists('captchalimit', $confHash) ? intval($confHash['captchalimit']) : 3;
|
21 |
$this->tempBlockLimit = array_key_exists('tempblocklimit', $confHash) ? intval($confHash['tempblocklimit']) : 10;
|
22 |
$this->blockAllLimit = array_key_exists('blockalllimit', $confHash) ? intval($confHash['blockalllimit']) : 100;
|
|
|
|
|
|
|
23 |
}
|
24 |
}
|
25 |
endif;
|
7 |
public $captchaLimit;
|
8 |
public $tempBlockLimit;
|
9 |
public $blockAllLimit;
|
10 |
+
public $failedLoginGap;
|
11 |
+
public $successLoginGap;
|
12 |
+
public $allBlockedGap;
|
13 |
|
14 |
public static $requests_table = 'lp_requests';
|
15 |
|
23 |
$this->captchaLimit = array_key_exists('captchalimit', $confHash) ? intval($confHash['captchalimit']) : 3;
|
24 |
$this->tempBlockLimit = array_key_exists('tempblocklimit', $confHash) ? intval($confHash['tempblocklimit']) : 10;
|
25 |
$this->blockAllLimit = array_key_exists('blockalllimit', $confHash) ? intval($confHash['blockalllimit']) : 100;
|
26 |
+
$this->failedLoginGap = array_key_exists('failedlogingap', $confHash) ? intval($confHash['failedlogingap']) : 1800;
|
27 |
+
$this->successLoginGap = array_key_exists('successlogingap', $confHash) ? intval($confHash['successlogingap']) : 1800;
|
28 |
+
$this->allBlockedGap = array_key_exists('allblockedgap', $confHash) ? intval($confHash['allblockedgap']) : 1800;
|
29 |
}
|
30 |
}
|
31 |
endif;
|
protect/wp/lp/lp.php
CHANGED
@@ -83,6 +83,18 @@ class BVWPLP {
|
|
83 |
return $this->config->captchaLimit;
|
84 |
}
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
public function getTempBlockLimit() {
|
87 |
return $this->config->tempBlockLimit;
|
88 |
}
|
@@ -149,7 +161,7 @@ class BVWPLP {
|
|
149 |
|
150 |
public function isLoginBlocked() {
|
151 |
if ($this->getAllowLoginsTransient() ||
|
152 |
-
($this->getLoginCount(BVWPLP::LOGINFAILURE) < $this->getBlockAllLimit())) {
|
153 |
return false;
|
154 |
}
|
155 |
return true;
|
@@ -184,7 +196,7 @@ class BVWPLP {
|
|
184 |
if ($this->isUnBlockedIP()) {
|
185 |
$this->setCategory(BVWPLP::UNBLOCKED);
|
186 |
} else {
|
187 |
-
$failed_attempts = $this->getLoginCount(BVWPLP::LOGINFAILURE, $this->ip);
|
188 |
if ($this->isWhitelistedIP()) {
|
189 |
$this->setCategory(BVWPLP::BYPASSED);
|
190 |
} else if ($this->isBlacklistedIP()) {
|
@@ -221,7 +233,7 @@ class BVWPLP {
|
|
221 |
}
|
222 |
|
223 |
public function isKnownLogin() {
|
224 |
-
return $this->getLoginCount(BVWPLP::LOGINSUCCESS, $this->ip,
|
225 |
}
|
226 |
|
227 |
public function getLoginCount($status, $ip = null, $gap = 1800) {
|
83 |
return $this->config->captchaLimit;
|
84 |
}
|
85 |
|
86 |
+
public function getFailedLoginGap() {
|
87 |
+
return $this->config->failedLoginGap;
|
88 |
+
}
|
89 |
+
|
90 |
+
public function getSuccessLoginGap() {
|
91 |
+
return $this->config->successLoginGap;
|
92 |
+
}
|
93 |
+
|
94 |
+
public function getAllBlockedGap() {
|
95 |
+
return $this->config->allBlockedGap;
|
96 |
+
}
|
97 |
+
|
98 |
public function getTempBlockLimit() {
|
99 |
return $this->config->tempBlockLimit;
|
100 |
}
|
161 |
|
162 |
public function isLoginBlocked() {
|
163 |
if ($this->getAllowLoginsTransient() ||
|
164 |
+
($this->getLoginCount(BVWPLP::LOGINFAILURE, null, $this->getAllBlockedGap()) < $this->getBlockAllLimit())) {
|
165 |
return false;
|
166 |
}
|
167 |
return true;
|
196 |
if ($this->isUnBlockedIP()) {
|
197 |
$this->setCategory(BVWPLP::UNBLOCKED);
|
198 |
} else {
|
199 |
+
$failed_attempts = $this->getLoginCount(BVWPLP::LOGINFAILURE, $this->ip, $this->getFailedLoginGap());
|
200 |
if ($this->isWhitelistedIP()) {
|
201 |
$this->setCategory(BVWPLP::BYPASSED);
|
202 |
} else if ($this->isBlacklistedIP()) {
|
233 |
}
|
234 |
|
235 |
public function isKnownLogin() {
|
236 |
+
return $this->getLoginCount(BVWPLP::LOGINSUCCESS, $this->ip, $this->getSuccessLoginGap()) > 0;
|
237 |
}
|
238 |
|
239 |
public function getLoginCount($status, $ip = null, $gap = 1800) {
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://app.blogvault.net/home/signup
|
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.8
|
8 |
Requires PHP: 5.4.0
|
9 |
-
Stable tag: 4.
|
10 |
License: GPLv2 or later
|
11 |
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
|
12 |
|
@@ -247,6 +247,13 @@ These are available on our website: [Terms of Service](https://blogvault.net/tos
|
|
247 |
9. We power WordPress migration for WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii and many more. Need we say more?
|
248 |
|
249 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
= 4.64 =
|
251 |
* Added latest WooCommerce Real-Time-Backup support.
|
252 |
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.8
|
8 |
Requires PHP: 5.4.0
|
9 |
+
Stable tag: 4.66
|
10 |
License: GPLv2 or later
|
11 |
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
|
12 |
|
247 |
9. We power WordPress migration for WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii and many more. Need we say more?
|
248 |
|
249 |
== CHANGELOG ==
|
250 |
+
= 4.66 =
|
251 |
+
* Post type fetch improvement.
|
252 |
+
* Handing wing version for ipstore wing.
|
253 |
+
* Making Login Protection more configurable.
|
254 |
+
* Robust handling of requests params.
|
255 |
+
* Callback wing versioning.
|
256 |
+
|
257 |
= 4.64 =
|
258 |
* Added latest WooCommerce Real-Time-Backup support.
|
259 |
|