| @@ -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.76 | |
| 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 | */ |
| @@ -103,16 +103,13 @@ | ||
| 103 | 103 | |
| 104 | 104 | require_once dirname( __FILE__ ) . '/php_error_monitoring/monitoring.php'; |
| 105 | 105 | WPRWPPHPErrorMonitoring::init(); |
| 106 | 106 | |
| 107 | +require_once dirname( __FILE__ ) . '/wp_actlog.php'; | |
| 108 | +$actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvinfo->isActivityLogActive() ? $bvinfo->config['activity_log'] : array()); | |
| 109 | +$actlog->init(); | |
| 110 | + | |
| 107 | 111 | if ($bvinfo->hasValidDBVersion()) { |
| 108 | - if ($bvinfo->isServiceActive('activity_log')) { | |
| 109 | - require_once dirname( __FILE__ ) . '/wp_actlog.php'; | |
| 110 | - $bvconfig = $bvinfo->config; | |
| 111 | - $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']); | |
| 112 | - $actlog->init(); | |
| 113 | - } | |
| 114 | - | |
| 115 | 112 | ##MAINTENANCEMODULE## |
| 116 | 113 | } |
| 117 | 114 | |
| 118 | 115 | if (WPRHelper::getRawParam('REQUEST', 'bvplugname') == "wpremote") { |
| @@ -125,9 +122,11 @@ | ||
| 125 | 122 | $pubkey = isset($pubkey) ? WPRAccount::sanitizeKey($pubkey) : ''; |
| 126 | 123 | $rcvracc = WPRHelper::getRawParam('REQUEST', 'rcvracc'); |
| 127 | 124 | |
| 128 | 125 | if (isset($rcvracc)) { |
| 129 | - $account = WPRRecover::find($bvsettings, $pubkey); | |
| 126 | + $bvctag = WPRHelper::getRawParam('REQUEST', 'bvctag'); | |
| 127 | + $bvctag = isset($bvctag) ? WPRAccount::sanitizeKey($bvctag) : null; | |
| 128 | + $account = WPRRecover::find($bvsettings, $pubkey, $bvctag); | |
| 130 | 129 | } else { |
| 131 | 130 | $account = WPRAccount::find($bvsettings, $pubkey); |
| 132 | 131 | } |
| 133 | 132 | |
| @@ -152,9 +151,11 @@ | ||
| 152 | 151 | $response->terminate($request->corruptedParamsResp()); |
| 153 | 152 | } |
| 154 | 153 | $request->params = $params; |
| 155 | 154 | $callback_handler = new WPRCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response); |
| 156 | - if ($request->is_afterload) { | |
| 155 | + if ($request->is_aftershutdown) { | |
| 156 | + $callback_handler->deferExecutionUntilShutdown(); | |
| 157 | + } else if ($request->is_afterload) { | |
| 157 | 158 | add_action('wp_loaded', array($callback_handler, 'execute')); |
| 158 | 159 | } else if ($request->is_admin_ajax) { |
| 159 | 160 | add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser')); |
| 160 | 161 | add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser')); |
| @@ -169,16 +170,16 @@ | ||
| 169 | 170 | if ($bvinfo->hasValidDBVersion()) { |
| 170 | 171 | if ($bvinfo->isProtectModuleEnabled()) { |
| 171 | 172 | require_once dirname( __FILE__ ) . '/protect/protect.php'; |
| 172 | 173 | //For backward compatibility. |
| 173 | - WPRProtect_V662::$settings = new WPRWPSettings(); | |
| 174 | - WPRProtect_V662::$db = new WPRWPDb(); | |
| 175 | - WPRProtect_V662::$info = new WPRInfo(WPRProtect_V662::$settings); | |
| 174 | + WPRProtect_V676::$settings = new WPRWPSettings(); | |
| 175 | + WPRProtect_V676::$db = new WPRWPDb(); | |
| 176 | + WPRProtect_V676::$info = new WPRInfo(WPRProtect_V676::$settings); | |
| 176 | 177 | |
| 177 | - add_action('wpr_clear_pt_config', array('WPRProtect_V662', 'uninstall')); | |
| 178 | + add_action('wpr_clear_pt_config', array('WPRProtect_V676', 'uninstall')); | |
| 178 | 179 | |
| 179 | 180 | if ($bvinfo->isActivePlugin()) { |
| 180 | - WPRProtect_V662::init(WPRProtect_V662::MODE_WP); | |
| 181 | + WPRProtect_V676::init(WPRProtect_V676::MODE_WP); | |
| 181 | 182 | } |
| 182 | 183 | } |
| 183 | 184 | |
| 184 | 185 | if ($bvinfo->isDynSyncModuleEnabled()) { |
| @@ -189,9 +190,9 @@ | ||
| 189 | 190 | } |
| 190 | 191 | |
| 191 | 192 | } |
| 192 | 193 | $bv_site_settings = $bvsettings->getOption('bv_site_settings'); |
| 193 | - if (isset($bv_site_settings)) { | |
| 194 | + if (is_array($bv_site_settings)) { | |
| 194 | 195 | if (isset($bv_site_settings['wp_auto_updates'])) { |
| 195 | 196 | $wp_auto_updates = $bv_site_settings['wp_auto_updates']; |
| 196 | 197 | if (array_key_exists('block_auto_update_core', $wp_auto_updates)) { |
| 197 | 198 | add_filter('auto_update_core', '__return_false' ); |
| @@ -207,8 +208,28 @@ | ||
| 207 | 208 | if (array_key_exists('block_auto_update_translation', $wp_auto_updates)) { |
| 208 | 209 | add_filter('auto_update_translation', '__return_false' ); |
| 209 | 210 | } |
| 210 | 211 | } |
| 212 | + | |
| 213 | + if (isset($bv_site_settings['security_hardening'])) { | |
| 214 | + $bv_security_hardening = $bv_site_settings['security_hardening']; | |
| 215 | + if (is_array($bv_security_hardening) && | |
| 216 | + isset($bv_security_hardening['version']) && | |
| 217 | + $bv_security_hardening['version'] === 1) { | |
| 218 | + if (isset($bv_security_hardening['disable_file_editor']) && | |
| 219 | + $bv_security_hardening['disable_file_editor'] === true && | |
| 220 | + !defined('DISALLOW_FILE_EDIT')) { | |
| 221 | + define('DISALLOW_FILE_EDIT', true); | |
| 222 | + } | |
| 223 | + | |
| 224 | + if (isset($bv_security_hardening['block_file_modifications']) && | |
| 225 | + $bv_security_hardening['block_file_modifications'] === true && | |
| 226 | + !defined('DISALLOW_FILE_MODS')) { | |
| 227 | + define('DISALLOW_FILE_MODS', true); | |
| 228 | + } | |
| 229 | + } | |
| 230 | + } | |
| 231 | + | |
| 211 | 232 | } |
| 212 | 233 | |
| 213 | 234 | if (is_admin()) { |
| 214 | 235 | add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate')); |