PluginProbe
The WP Remote WordPress Plugin / trunk
The WP Remote WordPress Plugin vtrunk
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 +33 -9 6.62trunk 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: 6.62
8 +Version: 6.72
9 9 Network: True
10 10 License: GPLv2 or later
11 11 License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
12 12 */
@@ -125,9 +125,11 @@
125 125 $pubkey = isset($pubkey) ? WPRAccount::sanitizeKey($pubkey) : '';
126 126 $rcvracc = WPRHelper::getRawParam('REQUEST', 'rcvracc');
127 127
128 128 if (isset($rcvracc)) {
129 - $account = WPRRecover::find($bvsettings, $pubkey);
129 + $bvctag = WPRHelper::getRawParam('REQUEST', 'bvctag');
130 + $bvctag = isset($bvctag) ? WPRAccount::sanitizeKey($bvctag) : null;
131 + $account = WPRRecover::find($bvsettings, $pubkey, $bvctag);
130 132 } else {
131 133 $account = WPRAccount::find($bvsettings, $pubkey);
132 134 }
133 135
@@ -152,9 +154,11 @@
152 154 $response->terminate($request->corruptedParamsResp());
153 155 }
154 156 $request->params = $params;
155 157 $callback_handler = new WPRCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
156 - if ($request->is_afterload) {
158 + if ($request->is_aftershutdown) {
159 + $callback_handler->deferExecutionUntilShutdown();
160 + } else if ($request->is_afterload) {
157 161 add_action('wp_loaded', array($callback_handler, 'execute'));
158 162 } else if ($request->is_admin_ajax) {
159 163 add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
160 164 add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
@@ -169,16 +173,16 @@
169 173 if ($bvinfo->hasValidDBVersion()) {
170 174 if ($bvinfo->isProtectModuleEnabled()) {
171 175 require_once dirname( __FILE__ ) . '/protect/protect.php';
172 176 //For backward compatibility.
173 - WPRProtect_V662::$settings = new WPRWPSettings();
174 - WPRProtect_V662::$db = new WPRWPDb();
175 - WPRProtect_V662::$info = new WPRInfo(WPRProtect_V662::$settings);
177 + WPRProtect_V672::$settings = new WPRWPSettings();
178 + WPRProtect_V672::$db = new WPRWPDb();
179 + WPRProtect_V672::$info = new WPRInfo(WPRProtect_V672::$settings);
176 180
177 - add_action('wpr_clear_pt_config', array('WPRProtect_V662', 'uninstall'));
181 + add_action('wpr_clear_pt_config', array('WPRProtect_V672', 'uninstall'));
178 182
179 183 if ($bvinfo->isActivePlugin()) {
180 - WPRProtect_V662::init(WPRProtect_V662::MODE_WP);
184 + WPRProtect_V672::init(WPRProtect_V672::MODE_WP);
181 185 }
182 186 }
183 187
184 188 if ($bvinfo->isDynSyncModuleEnabled()) {
@@ -189,9 +193,9 @@
189 193 }
190 194
191 195 }
192 196 $bv_site_settings = $bvsettings->getOption('bv_site_settings');
193 - if (isset($bv_site_settings)) {
197 + if (is_array($bv_site_settings)) {
194 198 if (isset($bv_site_settings['wp_auto_updates'])) {
195 199 $wp_auto_updates = $bv_site_settings['wp_auto_updates'];
196 200 if (array_key_exists('block_auto_update_core', $wp_auto_updates)) {
197 201 add_filter('auto_update_core', '__return_false' );
@@ -207,8 +211,28 @@
207 211 if (array_key_exists('block_auto_update_translation', $wp_auto_updates)) {
208 212 add_filter('auto_update_translation', '__return_false' );
209 213 }
210 214 }
215 +
216 + if (isset($bv_site_settings['security_hardening'])) {
217 + $bv_security_hardening = $bv_site_settings['security_hardening'];
218 + if (is_array($bv_security_hardening) &&
219 + isset($bv_security_hardening['version']) &&
220 + $bv_security_hardening['version'] === 1) {
221 + if (isset($bv_security_hardening['disable_file_editor']) &&
222 + $bv_security_hardening['disable_file_editor'] === true &&
223 + !defined('DISALLOW_FILE_EDIT')) {
224 + define('DISALLOW_FILE_EDIT', true);
225 + }
226 +
227 + if (isset($bv_security_hardening['block_file_modifications']) &&
228 + $bv_security_hardening['block_file_modifications'] === true &&
229 + !defined('DISALLOW_FILE_MODS')) {
230 + define('DISALLOW_FILE_MODS', true);
231 + }
232 + }
233 + }
234 +
211 235 }
212 236
213 237 if (is_admin()) {
214 238 add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate'));