| @@ -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.47 | |
| 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 | */ |
| @@ -69,8 +69,9 @@ | ||
| 69 | 69 | |
| 70 | 70 | ##DISABLE_OTHER_OPTIMIZATION_PLUGINS## |
| 71 | 71 | |
| 72 | 72 | ##WPCLIMODULE## |
| 73 | + | |
| 73 | 74 | if (is_admin()) { |
| 74 | 75 | require_once dirname( __FILE__ ) . '/wp_admin.php'; |
| 75 | 76 | $wpadmin = new WPRWPAdmin($bvsettings, $bvsiteinfo); |
| 76 | 77 | add_action('admin_init', array($wpadmin, 'initHandler')); |
| @@ -88,10 +89,8 @@ | ||
| 88 | 89 | ##MG_AJAX_ACTIONS## |
| 89 | 90 | ##POPUP_ON_DEACTIVATION## |
| 90 | 91 | add_action('admin_notices', array($wpadmin, 'activateWarning')); |
| 91 | 92 | add_action('admin_enqueue_scripts', array($wpadmin, 'wprsecAdminMenu')); |
| 92 | - ##ALPURGECACHEFUNCTION## | |
| 93 | - ##ALADMINMENU## | |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | 95 | if ((array_key_exists('bvreqmerge', $_POST)) || (array_key_exists('bvreqmerge', $_GET))) { // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended |
| 97 | 96 | $_REQUEST = array_merge($_GET, $_POST); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended |
| @@ -126,9 +125,11 @@ | ||
| 126 | 125 | $pubkey = isset($pubkey) ? WPRAccount::sanitizeKey($pubkey) : ''; |
| 127 | 126 | $rcvracc = WPRHelper::getRawParam('REQUEST', 'rcvracc'); |
| 128 | 127 | |
| 129 | 128 | if (isset($rcvracc)) { |
| 130 | - $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); | |
| 131 | 132 | } else { |
| 132 | 133 | $account = WPRAccount::find($bvsettings, $pubkey); |
| 133 | 134 | } |
| 134 | 135 | |
| @@ -153,9 +154,11 @@ | ||
| 153 | 154 | $response->terminate($request->corruptedParamsResp()); |
| 154 | 155 | } |
| 155 | 156 | $request->params = $params; |
| 156 | 157 | $callback_handler = new WPRCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response); |
| 157 | - if ($request->is_afterload) { | |
| 158 | + if ($request->is_aftershutdown) { | |
| 159 | + $callback_handler->deferExecutionUntilShutdown(); | |
| 160 | + } else if ($request->is_afterload) { | |
| 158 | 161 | add_action('wp_loaded', array($callback_handler, 'execute')); |
| 159 | 162 | } else if ($request->is_admin_ajax) { |
| 160 | 163 | add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser')); |
| 161 | 164 | add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser')); |
| @@ -170,16 +173,16 @@ | ||
| 170 | 173 | if ($bvinfo->hasValidDBVersion()) { |
| 171 | 174 | if ($bvinfo->isProtectModuleEnabled()) { |
| 172 | 175 | require_once dirname( __FILE__ ) . '/protect/protect.php'; |
| 173 | 176 | //For backward compatibility. |
| 174 | - WPRProtect_V647::$settings = new WPRWPSettings(); | |
| 175 | - WPRProtect_V647::$db = new WPRWPDb(); | |
| 176 | - WPRProtect_V647::$info = new WPRInfo(WPRProtect_V647::$settings); | |
| 177 | + WPRProtect_V672::$settings = new WPRWPSettings(); | |
| 178 | + WPRProtect_V672::$db = new WPRWPDb(); | |
| 179 | + WPRProtect_V672::$info = new WPRInfo(WPRProtect_V672::$settings); | |
| 177 | 180 | |
| 178 | - add_action('wpr_clear_pt_config', array('WPRProtect_V647', 'uninstall')); | |
| 181 | + add_action('wpr_clear_pt_config', array('WPRProtect_V672', 'uninstall')); | |
| 179 | 182 | |
| 180 | 183 | if ($bvinfo->isActivePlugin()) { |
| 181 | - WPRProtect_V647::init(WPRProtect_V647::MODE_WP); | |
| 184 | + WPRProtect_V672::init(WPRProtect_V672::MODE_WP); | |
| 182 | 185 | } |
| 183 | 186 | } |
| 184 | 187 | |
| 185 | 188 | if ($bvinfo->isDynSyncModuleEnabled()) { |
| @@ -190,9 +193,9 @@ | ||
| 190 | 193 | } |
| 191 | 194 | |
| 192 | 195 | } |
| 193 | 196 | $bv_site_settings = $bvsettings->getOption('bv_site_settings'); |
| 194 | - if (isset($bv_site_settings)) { | |
| 197 | + if (is_array($bv_site_settings)) { | |
| 195 | 198 | if (isset($bv_site_settings['wp_auto_updates'])) { |
| 196 | 199 | $wp_auto_updates = $bv_site_settings['wp_auto_updates']; |
| 197 | 200 | if (array_key_exists('block_auto_update_core', $wp_auto_updates)) { |
| 198 | 201 | add_filter('auto_update_core', '__return_false' ); |
| @@ -208,8 +211,28 @@ | ||
| 208 | 211 | if (array_key_exists('block_auto_update_translation', $wp_auto_updates)) { |
| 209 | 212 | add_filter('auto_update_translation', '__return_false' ); |
| 210 | 213 | } |
| 211 | 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 | + | |
| 212 | 235 | } |
| 213 | 236 | |
| 214 | 237 | if (is_admin()) { |
| 215 | 238 | add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate')); |
| @@ -228,5 +251,5 @@ | ||
| 228 | 251 | $wp_login_whitelabel->init(); |
| 229 | 252 | } |
| 230 | 253 | |
| 231 | 254 | add_action('wpr_clear_wp_2fa_config', array($wp_action, 'clear_wp_2fa_config')); |
| 232 | -##PLUGIN_LOADED_MODULE## | |
| 255 | +##PLUGIN_LOADED_MODULE## | |