PluginProbe
The WP Remote WordPress Plugin / 4.84
The WP Remote WordPress Plugin v4.84
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 -90 5.724.84 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.84
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,21 +53,18 @@
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 - add_filter('debug_information', array($wpadmin, 'handlePluginHealthInfo'), 10, 1);
73 67 if ($bvsiteinfo->isMultisite()) {
74 68 add_action('network_admin_menu', array($wpadmin, 'menu'));
75 69 } else {
76 70 add_action('admin_menu', array($wpadmin, 'menu'));
@@ -86,16 +80,8 @@
86 80 if ((array_key_exists('bvreqmerge', $_POST)) || (array_key_exists('bvreqmerge', $_GET))) {
87 81 $_REQUEST = array_merge($_GET, $_POST);
88 82 }
89 83
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 84 if ($bvinfo->hasValidDBVersion()) {
99 85 if ($bvinfo->isServiceActive('activity_log')) {
100 86 require_once dirname( __FILE__ ) . '/wp_actlog.php';
101 87 $bvconfig = $bvinfo->config;
@@ -102,15 +88,8 @@
102 88 $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']);
103 89 $actlog->init();
104 90 }
105 91
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 92 }
114 93
115 94 if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "wpremote")) {
116 95 require_once dirname( __FILE__ ) . '/callback/base.php';
@@ -125,82 +104,58 @@
125 104 } else {
126 105 $account = WPRAccount::find($bvsettings, $pubkey);
127 106 }
128 107
129 - $request = new BVCallbackRequest($account, $_REQUEST, $bvsettings);
108 + $request = new BVCallbackRequest($account, $_REQUEST);
130 109 $response = new BVCallbackResponse($request->bvb64cksize);
131 110
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);
111 + if ($account && (1 === $account->authenticate($request))) {
112 + define('WPRBASEPATH', plugin_dir_path(__FILE__));
136 113
137 - #handling of Formidable plugin
138 - add_filter('frm_is_field_hidden', '__return_true', PHP_INT_MAX, 3);
139 114
140 - #handling of WP Forms plugin
141 - add_filter('wpforms_process_bypass_captcha', '__return_true', PHP_INT_MAX, 3);
115 + require_once dirname( __FILE__ ) . '/callback/handler.php';
142 116
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 - });
117 + $params = $request->processParams($_REQUEST);
118 + if ($params === false) {
119 + $resp = array(
120 + "account_info" => $account->info(),
121 + "request_info" => $request->info(),
122 + "bvinfo" => $bvinfo->info(),
123 + "statusmsg" => "BVPRMS_CORRUPTED"
124 + );
125 + $response->terminate($resp);
126 + }
127 + $request->params = $params;
128 + $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
129 + if ($request->is_afterload) {
130 + add_action('wp_loaded', array($callback_handler, 'execute'));
131 + } else if ($request->is_admin_ajax) {
132 + add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
133 + add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
164 134 } 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 - }
135 + $callback_handler->execute();
184 136 }
185 137 } else {
186 - $response->terminate($request->authFailedResp());
138 + $resp = array(
139 + "account_info" => $account ? $account->info() : array("error" => "ACCOUNT_NOT_FOUND"),
140 + "request_info" => $request->info(),
141 + "bvinfo" => $bvinfo->info(),
142 + "statusmsg" => "FAILED_AUTH",
143 + "api_pubkey" => substr(WPRAccount::getApiPublicKey($bvsettings), 0, 8),
144 + "def_sigmatch" => substr(WPRAccount::getSigMatch($request, WPRRecover::getDefaultSecret($bvsettings)), 0, 8)
145 + );
146 + $response->terminate($resp);
187 147 }
188 148 } else {
189 149 if ($bvinfo->hasValidDBVersion()) {
190 150 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 - }
151 + require_once dirname( __FILE__ ) . '/protect/wp/protect.php';
152 + $bvprotect = new BVProtect($bvdb, $bvsettings);
153 + $bvprotect->init();
154 + if ($bvinfo->isActivePlugin() && !(defined( 'WP_CLI' ) && WP_CLI)) {
155 + $bvprotect->run();
202 156 }
157 + }
203 158
204 159 if ($bvinfo->isDynSyncModuleEnabled()) {
205 160 require_once dirname( __FILE__ ) . '/wp_dynsync.php';
206 161 $bvconfig = $bvinfo->config;
@@ -229,10 +184,5 @@
229 184 }
230 185 }
231 186 }
232 187
233 - if (is_admin()) {
234 - add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate'));
235 - }
236 -
237 - ##THIRDPARTYCACHINGMODULE##
238 188 }