PluginProbe
The WP Remote WordPress Plugin / 4.86
The WP Remote WordPress Plugin v4.86
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 5.73 All 53 releases
← All changes | plugin.php +40 -85 5.724.86 View file →
@@ -4,9 +4,9 @@
4 4 Plugin URI: https://wpremote.com
5 5 Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>.
6 6 Author: WP Remote
7 7 Author URI: https://wpremote.com
8 -Version: 5.72
8 +Version: 4.86
9 9 Network: True
10 10 */
11 11
12 12 /* Copyright 2017 WP Remote (email : support@wpremote.com)
@@ -36,11 +36,8 @@
36 36 require_once dirname( __FILE__ ) . '/wp_api.php';
37 37 require_once dirname( __FILE__ ) . '/wp_actions.php';
38 38 require_once dirname( __FILE__ ) . '/info.php';
39 39 require_once dirname( __FILE__ ) . '/account.php';
40 -require_once dirname( __FILE__ ) . '/helper.php';
41 -require_once dirname( __FILE__ ) . '/wp_2fa/wp_2fa.php';
42 -
43 40 ##WPCACHEMODULE##
44 41
45 42
46 43 $bvsettings = new WPRWPSettings();
@@ -56,19 +53,17 @@
56 53 register_activation_hook(__FILE__, array($wp_action, 'activate'));
57 54 register_deactivation_hook(__FILE__, array($wp_action, 'deactivate'));
58 55
59 56 add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
60 -add_action('wpr_clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
57 +add_action('clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
61 58 ##SOADDUNINSTALLACTION##
62 59
63 -##DISABLE_OTHER_OPTIMIZATION_PLUGINS##
64 -
65 60 ##WPCLIMODULE##
66 61 if (is_admin()) {
67 62 require_once dirname( __FILE__ ) . '/wp_admin.php';
68 63 $wpadmin = new WPRWPAdmin($bvsettings, $bvsiteinfo);
69 64 add_action('admin_init', array($wpadmin, 'initHandler'));
70 - add_filter('all_plugins', array($wpadmin, 'initWhitelabel'));
65 + add_filter('all_plugins', array($wpadmin, 'initBranding'));
71 66 add_filter('plugin_row_meta', array($wpadmin, 'hidePluginDetails'), 10, 2);
72 67 add_filter('debug_information', array($wpadmin, 'handlePluginHealthInfo'), 10, 1);
73 68 if ($bvsiteinfo->isMultisite()) {
74 69 add_action('network_admin_menu', array($wpadmin, 'menu'));
@@ -86,16 +81,8 @@
86 81 if ((array_key_exists('bvreqmerge', $_POST)) || (array_key_exists('bvreqmerge', $_GET))) {
87 82 $_REQUEST = array_merge($_GET, $_POST);
88 83 }
89 84
90 -#Service active check
91 -if ($bvinfo->config != false) {
92 - add_action('wpr_remove_bv_preload_include', array($wp_action, 'removeBVPreload'));
93 -}
94 -
95 -require_once dirname( __FILE__ ) . '/php_error_monitoring/monitoring.php';
96 -WPRWPPHPErrorMonitoring::init();
97 -
98 85 if ($bvinfo->hasValidDBVersion()) {
99 86 if ($bvinfo->isServiceActive('activity_log')) {
100 87 require_once dirname( __FILE__ ) . '/wp_actlog.php';
101 88 $bvconfig = $bvinfo->config;
@@ -102,15 +89,8 @@
102 89 $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']);
103 90 $actlog->init();
104 91 }
105 92
106 - if ($bvinfo->isServiceActive('maintenance_mode')) {
107 - require_once dirname( __FILE__ ). '/maintenance/wp_maintenance.php';
108 - $bvconfig = $bvinfo->config;
109 - $maintenance = new BVWPMaintenance($bvconfig['maintenance_mode']);
110 - $maintenance->init();
111 - }
112 -
113 93 }
114 94
115 95 if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "wpremote")) {
116 96 require_once dirname( __FILE__ ) . '/callback/base.php';
@@ -125,82 +105,58 @@
125 105 } else {
126 106 $account = WPRAccount::find($bvsettings, $pubkey);
127 107 }
128 108
129 - $request = new BVCallbackRequest($account, $_REQUEST, $bvsettings);
109 + $request = new BVCallbackRequest($account, $_REQUEST);
130 110 $response = new BVCallbackResponse($request->bvb64cksize);
131 111
132 - if ($request->authenticate() === 1) {
133 - if (array_key_exists('bv_ignr_frm_cptch', $_REQUEST)) {
134 - #handling of Contact Forms 7
135 - add_filter('wpcf7_skip_spam_check', '__return_true', PHP_INT_MAX, 2);
112 + if ($account && (1 === $account->authenticate($request))) {
113 + define('WPRBASEPATH', plugin_dir_path(__FILE__));
136 114
137 - #handling of Formidable plugin
138 - add_filter('frm_is_field_hidden', '__return_true', PHP_INT_MAX, 3);
139 115
140 - #handling of WP Forms plugin
141 - add_filter('wpforms_process_bypass_captcha', '__return_true', PHP_INT_MAX, 3);
116 + require_once dirname( __FILE__ ) . '/callback/handler.php';
142 117
143 - #handling of Forminator plugin
144 - if (defined('WP_PLUGIN_DIR')) {
145 - $abstractFrontActionFilePath = WP_PLUGIN_DIR . '/forminator/library/abstracts/abstract-class-front-action.php';
146 - $frontActionFilePath = WP_PLUGIN_DIR . '/forminator/library/modules/custom-forms/front/front-action.php';
147 -
148 - if (file_exists($abstractFrontActionFilePath) && file_exists($frontActionFilePath)) {
149 - require_once $abstractFrontActionFilePath;
150 - require_once $frontActionFilePath;
151 - if (class_exists('Forminator_CForm_Front_Action')) {
152 - Forminator_CForm_Front_Action::$hidden_fields[] = "bv-stripe-";
153 - }
154 - }
155 - }
156 -
157 - #handling of CleanTalk Antispam plugin
158 - add_action('init', function() {
159 - global $apbct;
160 - if (isset($apbct) && is_object($apbct)) {
161 - $apbct->settings['forms__contact_forms_test'] = 0;
162 - }
163 - });
118 + $params = $request->processParams($_REQUEST);
119 + if ($params === false) {
120 + $resp = array(
121 + "account_info" => $account->info(),
122 + "request_info" => $request->info(),
123 + "bvinfo" => $bvinfo->info(),
124 + "statusmsg" => "BVPRMS_CORRUPTED"
125 + );
126 + $response->terminate($resp);
127 + }
128 + $request->params = $params;
129 + $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
130 + if ($request->is_afterload) {
131 + add_action('wp_loaded', array($callback_handler, 'execute'));
132 + } else if ($request->is_admin_ajax) {
133 + add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
134 + add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
164 135 } else {
165 - define('WPRBASEPATH', plugin_dir_path(__FILE__));
166 -
167 -
168 - require_once dirname( __FILE__ ) . '/callback/handler.php';
169 -
170 - $params = $request->processParams($_REQUEST);
171 - if ($params === false) {
172 - $response->terminate($request->corruptedParamsResp());
173 - }
174 - $request->params = $params;
175 - $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
176 - if ($request->is_afterload) {
177 - add_action('wp_loaded', array($callback_handler, 'execute'));
178 - } else if ($request->is_admin_ajax) {
179 - add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
180 - add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
181 - } else {
182 - $callback_handler->execute();
183 - }
136 + $callback_handler->execute();
184 137 }
185 138 } else {
186 - $response->terminate($request->authFailedResp());
139 + $resp = array(
140 + "account_info" => $account ? $account->info() : array("error" => "ACCOUNT_NOT_FOUND"),
141 + "request_info" => $request->info(),
142 + "bvinfo" => $bvinfo->info(),
143 + "statusmsg" => "FAILED_AUTH",
144 + "api_pubkey" => substr(WPRAccount::getApiPublicKey($bvsettings), 0, 8),
145 + "def_sigmatch" => substr(WPRAccount::getSigMatch($request, WPRRecover::getDefaultSecret($bvsettings)), 0, 8)
146 + );
147 + $response->terminate($resp);
187 148 }
188 149 } else {
189 150 if ($bvinfo->hasValidDBVersion()) {
190 151 if ($bvinfo->isProtectModuleEnabled()) {
191 - require_once dirname( __FILE__ ) . '/protect/protect.php';
192 - //For backward compatibility.
193 - WPRProtect_V572::$settings = new WPRWPSettings();
194 - WPRProtect_V572::$db = new WPRWPDb();
195 - WPRProtect_V572::$info = new WPRInfo(WPRProtect_V572::$settings);
196 -
197 - add_action('wpr_clear_pt_config', array('WPRProtect_V572', 'uninstall'));
198 -
199 - if ($bvinfo->isActivePlugin()) {
200 - WPRProtect_V572::init(WPRProtect_V572::MODE_WP);
201 - }
152 + require_once dirname( __FILE__ ) . '/protect/wp/protect.php';
153 + $bvprotect = new BVProtect($bvdb, $bvsettings);
154 + $bvprotect->init();
155 + if ($bvinfo->isActivePlugin() && !(defined( 'WP_CLI' ) && WP_CLI)) {
156 + $bvprotect->run();
202 157 }
158 + }
203 159
204 160 if ($bvinfo->isDynSyncModuleEnabled()) {
205 161 require_once dirname( __FILE__ ) . '/wp_dynsync.php';
206 162 $bvconfig = $bvinfo->config;
@@ -233,6 +189,5 @@
233 189 if (is_admin()) {
234 190 add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate'));
235 191 }
236 192
237 - ##THIRDPARTYCACHINGMODULE##
238 193 }