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 -52 5.534.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.53
8 +Version: 4.84
9 9 Network: True
10 10 */
11 11
12 12 /* Copyright 2017 WP Remote (email : support@wpremote.com)
@@ -36,9 +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 40 ##WPCACHEMODULE##
42 41
43 42
44 43 $bvsettings = new WPRWPSettings();
@@ -57,18 +56,15 @@
57 56 add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
58 57 add_action('clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
59 58 ##SOADDUNINSTALLACTION##
60 59
61 -##DISABLE_OTHER_OPTIMIZATION_PLUGINS##
62 -
63 60 ##WPCLIMODULE##
64 61 if (is_admin()) {
65 62 require_once dirname( __FILE__ ) . '/wp_admin.php';
66 63 $wpadmin = new WPRWPAdmin($bvsettings, $bvsiteinfo);
67 64 add_action('admin_init', array($wpadmin, 'initHandler'));
68 - add_filter('all_plugins', array($wpadmin, 'initWhitelabel'));
65 + add_filter('all_plugins', array($wpadmin, 'initBranding'));
69 66 add_filter('plugin_row_meta', array($wpadmin, 'hidePluginDetails'), 10, 2);
70 - add_filter('debug_information', array($wpadmin, 'handlePluginHealthInfo'), 10, 1);
71 67 if ($bvsiteinfo->isMultisite()) {
72 68 add_action('network_admin_menu', array($wpadmin, 'menu'));
73 69 } else {
74 70 add_action('admin_menu', array($wpadmin, 'menu'));
@@ -92,15 +88,8 @@
92 88 $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']);
93 89 $actlog->init();
94 90 }
95 91
96 - if ($bvinfo->isServiceActive('maintenance_mode')) {
97 - require_once dirname( __FILE__ ). '/maintenance/wp_maintenance.php';
98 - $bvconfig = $bvinfo->config;
99 - $maintenance = new BVWPMaintenance($bvconfig['maintenance_mode']);
100 - $maintenance->init();
101 - }
102 -
103 92 }
104 93
105 94 if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "wpremote")) {
106 95 require_once dirname( __FILE__ ) . '/callback/base.php';
@@ -115,54 +104,58 @@
115 104 } else {
116 105 $account = WPRAccount::find($bvsettings, $pubkey);
117 106 }
118 107
119 - $request = new BVCallbackRequest($account, $_REQUEST, $bvsettings);
108 + $request = new BVCallbackRequest($account, $_REQUEST);
120 109 $response = new BVCallbackResponse($request->bvb64cksize);
121 110
122 - if ($request->authenticate() === 1) {
123 - if (array_key_exists('bv_ignr_frm_cptch', $_REQUEST)) {
124 - #handling of Contact Forms 7
125 - 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__));
126 113
127 - #handling of Formidable plugin
128 - add_filter('frm_is_field_hidden', '__return_true', PHP_INT_MAX, 3);
129 114
130 - #handling of WP Forms plugin
131 - add_filter('wpforms_process_bypass_captcha', '__return_true', PHP_INT_MAX, 3);
115 + require_once dirname( __FILE__ ) . '/callback/handler.php';
116 +
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'));
132 134 } else {
133 - define('WPRBASEPATH', plugin_dir_path(__FILE__));
134 -
135 -
136 - require_once dirname( __FILE__ ) . '/callback/handler.php';
137 -
138 - $params = $request->processParams($_REQUEST);
139 - if ($params === false) {
140 - $response->terminate($request->corruptedParamsResp());
141 - }
142 - $request->params = $params;
143 - $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
144 - if ($request->is_afterload) {
145 - add_action('wp_loaded', array($callback_handler, 'execute'));
146 - } else if ($request->is_admin_ajax) {
147 - add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
148 - add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
149 - } else {
150 - $callback_handler->execute();
151 - }
135 + $callback_handler->execute();
152 136 }
153 137 } else {
154 - $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);
155 147 }
156 148 } else {
157 149 if ($bvinfo->hasValidDBVersion()) {
158 150 if ($bvinfo->isProtectModuleEnabled()) {
159 - require_once dirname( __FILE__ ) . '/protect/protect.php';
160 - add_action('clear_pt_config', array('WPRProtect_V553', 'uninstall'));
161 - if ($bvinfo->isActivePlugin() && !(defined( 'WP_CLI' ) && WP_CLI)) {
162 - WPRProtect_V553::init(WPRProtect_V553::MODE_WP);
163 - }
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();
164 156 }
157 + }
165 158
166 159 if ($bvinfo->isDynSyncModuleEnabled()) {
167 160 require_once dirname( __FILE__ ) . '/wp_dynsync.php';
168 161 $bvconfig = $bvinfo->config;
@@ -191,10 +184,5 @@
191 184 }
192 185 }
193 186 }
194 187
195 - if (is_admin()) {
196 - add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate'));
197 - }
198 -
199 - ##THIRDPARTYCACHINGMODULE##
200 188 }