PluginProbe
The WP Remote WordPress Plugin / 6.76
The WP Remote WordPress Plugin v6.76
6.76 6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 All 54 releases
← All changes | info.php +43 -33 5.456.76 View file →
@@ -9,9 +9,10 @@
9 9 public $brandname = 'WP Remote';
10 10 public $badgeinfo = 'wprbadge';
11 11 public $ip_header_option = 'wpripheader';
12 12 public $brand_option = 'bv_whitelabel_infos';
13 - public $version = '5.45';
13 + public $wp_lp_whitelabel_option = 'wprLpWhitelabelConf';
14 + public $version = '6.76';
14 15 public $webpage = 'https://wpremote.com';
15 16 public $appurl = 'https://app.wpremote.com';
16 17 public $slug = 'wpremote/plugin.php';
17 18 public $plug_redirect = 'wprredirect';
@@ -20,9 +21,10 @@
20 21 public $services_option_name = 'wprconfig';
21 22 public $author = 'WP Remote';
22 23 public $title = 'WP Remote';
23 24
24 - const DB_VERSION = '4';
25 + const DB_VERSION = '5';
26 + const AL_CONF_VERSION = '1.1';
25 27
26 28 public function __construct($settings) {
27 29 $this->settings = $settings;
28 30 $this->config = $this->settings->getOption($this->services_option_name);
@@ -35,8 +37,16 @@
35 37 }
36 38 return false;
37 39 }
38 40
41 + # The server leases capture for a few days at a time; a stale configuration
42 + # registers nothing.
43 + public function isActivityLogActive() {
44 + $config = isset($this->config['activity_log']) ? $this->config['activity_log'] : null;
45 + return $this->hasValidDBVersion() && is_array($config) && !empty($config['hooks']) &&
46 + isset($config['enabled_until']) && is_numeric($config['enabled_until']) && $config['enabled_until'] > time();
47 + }
48 +
39 49 public function hasValidDBVersion() {
40 50 return WPRInfo::DB_VERSION === $this->getCurrentDBVersion();
41 51 }
42 52
@@ -56,49 +66,44 @@
56 66
57 67 return false;
58 68 }
59 69
60 - public function getLatestElementorDBVersion($file) {
61 - if (defined('ELEMENTOR_PATH') && file_exists(ELEMENTOR_PATH . 'core/upgrade/manager.php')) {
62 - include_once ELEMENTOR_PATH . 'core/upgrade/manager.php';
70 + public function getConnectionKey() {
71 + require_once dirname( __FILE__ ) . '/recover.php';
72 + $bvsiteinfo = new WPRWPSiteInfo();
73 + $encoded_url = base64_encode($bvsiteinfo->siteurl());
74 + $secret = WPRRecover::defaultSecret($this->settings);
75 + $tag = WPRRecover::connectionTag($this->settings);
63 76
64 - if ($file === 'elementor-pro/elementor-pro.php') {
65 - $managerClass = '\ElementorPro\Core\Upgrade\Manager';
66 - } else {
67 - $managerClass = '\Elementor\Core\Upgrade\Manager';
68 - }
77 + #No tag means this site has no salt material in wp-config.php, and there
78 + #is no connection key that would be safe to hand out.
79 + if (empty($secret) || empty($tag)) {
80 + return null;
81 + }
69 82
70 - $manager = new $managerClass();
83 + return base64_encode("v3:".$secret.":".$encoded_url.":".$this->plugname.":".$tag);
84 + }
71 85
72 - return $manager->get_new_version();
86 + public function getLatestElementorDBVersion($file) {
87 + $managerClass = $file === "elementor/elementor.php" ? '\Elementor\Core\Upgrade\Manager' : '\ElementorPro\Core\Upgrade\Manager';
88 +
89 + if (!class_exists($managerClass)) {
90 + return false;
73 91 }
74 92
75 - return false;
93 + $manager = new $managerClass();
94 + return $manager->get_new_version();
76 95 }
77 96
78 97 public static function getRequestID() {
79 - if (!defined("BV_REQUEST_ID")) {
80 - define("BV_REQUEST_ID", uniqid(mt_rand()));
98 + if (!defined("WPR_REQUEST_ID")) {
99 + define("WPR_REQUEST_ID", uniqid(mt_rand())); // phpcs:ignore WordPress.WP.AlternativeFunctions.rand_mt_rand
81 100 }
82 - return BV_REQUEST_ID;
101 + return WPR_REQUEST_ID;
83 102 }
84 103
85 - public function canSetCWBranding() {
86 - if (WPRWPSiteInfo::isCWServer()) {
87 -
88 - $bot_protect_accounts = WPRAccount::accountsByType($this->settings, 'botprotect');
89 - if (sizeof($bot_protect_accounts) >= 1)
90 - return true;
91 -
92 - $bot_protect_accounts = WPRAccount::accountsByPattern($this->settings, 'email', '/@cw_user\.com$/');
93 - if (sizeof($bot_protect_accounts) >= 1)
94 - return true;
95 - }
96 -
97 - return false;
98 - }
99 -
100 104 public function canWhiteLabel($slug = NULL) {
105 + // phpcs:disable WordPress.Security.NonceVerification.Recommended
101 106 if (array_key_exists("bv_override_global_whitelabel", $_REQUEST)) {
102 107 return false;
103 108 }
104 109 if (array_key_exists("bv_override_plugin_whitelabel", $_REQUEST) && isset($slug) &&
@@ -104,8 +109,9 @@
104 109 if (array_key_exists("bv_override_plugin_whitelabel", $_REQUEST) && isset($slug) &&
105 110 $_REQUEST["bv_override_plugin_whitelabel"] === $slug) {
106 111 return false;
107 112 }
113 + // phpcs:enable WordPress.Security.NonceVerification.Recommended
108 114 return true;
109 115 }
110 116
111 117 public function getPluginWhitelabelInfo($slug = null) {
@@ -127,8 +133,13 @@
127 133 $whitelabel_infos = $this->settings->getOption($this->brand_option);
128 134 return is_array($whitelabel_infos) ? $whitelabel_infos : array();
129 135 }
130 136
137 + public function getLPWhitelabelInfo() {
138 + $infos = $this->settings->getOption($this->wp_lp_whitelabel_option);
139 + return is_array($infos) ? $infos : array();
140 + }
141 +
131 142 public function getPluginsWhitelabelInfoByTitle() {
132 143 $whitelabel_infos = $this->getPluginsWhitelabelInfos();
133 144 $whitelabel_infos_by_title = array();
134 145 foreach ($whitelabel_infos as $slug => $whitelabel_info) {
@@ -144,9 +155,8 @@
144 155 $brand = $this->getPluginWhitelabelInfo();
145 156 if (is_array($brand) && array_key_exists('menuname', $brand)) {
146 157 return $brand['menuname'];
147 158 }
148 -
149 159 return $this->brandname;
150 160 }
151 161
152 162 public function getBrandIcon() {
@@ -236,5 +246,5 @@
236 246 "plugname" => $this->plugname
237 247 );
238 248 }
239 249 }
240 -endif;
250 +endif;