| @@ -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.05 | |
| 8 | +Version: 5.47 | |
| 9 | 9 | Network: True |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | /* Copyright 2017 WP Remote (email : support@wpremote.com) |
| @@ -64,9 +64,9 @@ | ||
| 64 | 64 | if (is_admin()) { |
| 65 | 65 | require_once dirname( __FILE__ ) . '/wp_admin.php'; |
| 66 | 66 | $wpadmin = new WPRWPAdmin($bvsettings, $bvsiteinfo); |
| 67 | 67 | add_action('admin_init', array($wpadmin, 'initHandler')); |
| 68 | - add_filter('all_plugins', array($wpadmin, 'initBranding')); | |
| 68 | + add_filter('all_plugins', array($wpadmin, 'initWhitelabel')); | |
| 69 | 69 | add_filter('plugin_row_meta', array($wpadmin, 'hidePluginDetails'), 10, 2); |
| 70 | 70 | add_filter('debug_information', array($wpadmin, 'handlePluginHealthInfo'), 10, 1); |
| 71 | 71 | if ($bvsiteinfo->isMultisite()) { |
| 72 | 72 | add_action('network_admin_menu', array($wpadmin, 'menu')); |
| @@ -92,8 +92,15 @@ | ||
| 92 | 92 | $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']); |
| 93 | 93 | $actlog->init(); |
| 94 | 94 | } |
| 95 | 95 | |
| 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 | + | |
| 96 | 103 | } |
| 97 | 104 | |
| 98 | 105 | if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "wpremote")) { |
| 99 | 106 | require_once dirname( __FILE__ ) . '/callback/base.php'; |
| @@ -108,58 +115,54 @@ | ||
| 108 | 115 | } else { |
| 109 | 116 | $account = WPRAccount::find($bvsettings, $pubkey); |
| 110 | 117 | } |
| 111 | 118 | |
| 112 | - $request = new BVCallbackRequest($account, $_REQUEST); | |
| 119 | + $request = new BVCallbackRequest($account, $_REQUEST, $bvsettings); | |
| 113 | 120 | $response = new BVCallbackResponse($request->bvb64cksize); |
| 114 | 121 | |
| 115 | - if ($account && (1 === $account->authenticate($request))) { | |
| 116 | - define('WPRBASEPATH', plugin_dir_path(__FILE__)); | |
| 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); | |
| 117 | 126 | |
| 127 | + #handling of Formidable plugin | |
| 128 | + add_filter('frm_is_field_hidden', '__return_true', PHP_INT_MAX, 3); | |
| 118 | 129 | |
| 119 | - require_once dirname( __FILE__ ) . '/callback/handler.php'; | |
| 130 | + #handling of WP Forms plugin | |
| 131 | + add_filter('wpforms_process_bypass_captcha', '__return_true', PHP_INT_MAX, 3); | |
| 132 | + } else { | |
| 133 | + define('WPRBASEPATH', plugin_dir_path(__FILE__)); | |
| 120 | 134 | |
| 121 | - $params = $request->processParams($_REQUEST); | |
| 122 | - if ($params === false) { | |
| 123 | - $resp = array( | |
| 124 | - "account_info" => $account->info(), | |
| 125 | - "request_info" => $request->info(), | |
| 126 | - "bvinfo" => $bvinfo->info(), | |
| 127 | - "statusmsg" => "BVPRMS_CORRUPTED" | |
| 128 | - ); | |
| 129 | - $response->terminate($resp); | |
| 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 | + } | |
| 130 | 152 | } |
| 131 | - $request->params = $params; | |
| 132 | - $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response); | |
| 133 | - if ($request->is_afterload) { | |
| 134 | - add_action('wp_loaded', array($callback_handler, 'execute')); | |
| 135 | - } else if ($request->is_admin_ajax) { | |
| 136 | - add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser')); | |
| 137 | - add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser')); | |
| 138 | - } else { | |
| 139 | - $callback_handler->execute(); | |
| 140 | - } | |
| 141 | 153 | } else { |
| 142 | - $resp = array( | |
| 143 | - "account_info" => $account ? $account->info() : array("error" => "ACCOUNT_NOT_FOUND"), | |
| 144 | - "request_info" => $request->info(), | |
| 145 | - "bvinfo" => $bvinfo->info(), | |
| 146 | - "statusmsg" => "FAILED_AUTH", | |
| 147 | - "api_pubkey" => substr(WPRAccount::getApiPublicKey($bvsettings), 0, 8), | |
| 148 | - "def_sigmatch" => substr(WPRAccount::getSigMatch($request, WPRRecover::getDefaultSecret($bvsettings)), 0, 8) | |
| 149 | - ); | |
| 150 | - $response->terminate($resp); | |
| 154 | + $response->terminate($request->authFailedResp()); | |
| 151 | 155 | } |
| 152 | 156 | } else { |
| 153 | 157 | if ($bvinfo->hasValidDBVersion()) { |
| 154 | 158 | if ($bvinfo->isProtectModuleEnabled()) { |
| 155 | - require_once dirname( __FILE__ ) . '/protect/wp/protect.php'; | |
| 156 | - $bvprotect = new BVProtect($bvdb, $bvsettings); | |
| 157 | - $bvprotect->init(); | |
| 158 | - if ($bvinfo->isActivePlugin() && !(defined( 'WP_CLI' ) && WP_CLI)) { | |
| 159 | - $bvprotect->run(); | |
| 159 | + require_once dirname( __FILE__ ) . '/protect/protect.php'; | |
| 160 | + add_action('clear_pt_config', array('WPRProtect_V547', 'uninstall')); | |
| 161 | + if ($bvinfo->isActivePlugin() && !(defined( 'WP_CLI' ) && WP_CLI)) { | |
| 162 | + WPRProtect_V547::init(WPRProtect_V547::MODE_WP); | |
| 163 | + } | |
| 160 | 164 | } |
| 161 | - } | |
| 162 | 165 | |
| 163 | 166 | if ($bvinfo->isDynSyncModuleEnabled()) { |
| 164 | 167 | require_once dirname( __FILE__ ) . '/wp_dynsync.php'; |
| 165 | 168 | $bvconfig = $bvinfo->config; |
| @@ -192,5 +195,6 @@ | ||
| 192 | 195 | if (is_admin()) { |
| 193 | 196 | add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate')); |
| 194 | 197 | } |
| 195 | 198 | |
| 199 | + ##THIRDPARTYCACHINGMODULE## | |
| 196 | 200 | } |