| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | if (!defined('ABSPATH') && !defined('MCDATAPATH')) exit; |
| 4 | 4 | |
| 5 | -if (!class_exists('WPRProtectRequest_V669')) : | |
| 6 | -class WPRProtectRequest_V669 { | |
| 5 | +if (!class_exists('WPRProtectRequest_V672')) : | |
| 6 | +class WPRProtectRequest_V672 { | |
| 7 | 7 | public $ip; |
| 8 | 8 | public $host = ''; |
| 9 | 9 | public $uri; |
| 10 | 10 | public $method = ''; |
| @@ -18,10 +18,10 @@ | ||
| 18 | 18 | public $json_params = array(); |
| 19 | 19 | public $raw_body = ''; |
| 20 | 20 | public $files; |
| 21 | 21 | public $respcode; |
| 22 | - public $status = WPRProtectRequest_V669::STATUS_ALLOWED; | |
| 23 | - public $category = WPRProtectRequest_V669::CATEGORY_NORMAL; | |
| 22 | + public $status = WPRProtectRequest_V672::STATUS_ALLOWED; | |
| 23 | + public $category = WPRProtectRequest_V672::CATEGORY_NORMAL; | |
| 24 | 24 | |
| 25 | 25 | public $wp_user; |
| 26 | 26 | |
| 27 | 27 | private $can_get_raw_body = false; |
| @@ -58,9 +58,9 @@ | ||
| 58 | 58 | const CATEGORY_PRIVATEIP = 80; |
| 59 | 59 | const CATEGORY_GLOBAL_BOT_BLOCKED = 90; |
| 60 | 60 | |
| 61 | 61 | public function __construct($ip_header, $config) { |
| 62 | - $this->ip = WPRProtectUtils_V669::getIP($ip_header); | |
| 62 | + $this->ip = WPRProtectUtils_V672::getIP($ip_header); | |
| 63 | 63 | $this->timestamp = time(); |
| 64 | 64 | $this->get_params = $_GET; // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
| 65 | 65 | $this->cookies = $_COOKIE; |
| 66 | 66 | $this->post_params = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| @@ -140,17 +140,17 @@ | ||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | public static function blacklistedCategories() { |
| 143 | 143 | return array( |
| 144 | - WPRProtectRequest_V669::CATEGORY_BOT_BLOCKED, | |
| 145 | - WPRProtectRequest_V669::CATEGORY_COUNTRY_BLOCKED, | |
| 146 | - WPRProtectRequest_V669::CATEGORY_USER_BLACKLISTED, | |
| 147 | - WPRProtectRequest_V669::CATEGORY_GLOBAL_BOT_BLOCKED | |
| 144 | + WPRProtectRequest_V672::CATEGORY_BOT_BLOCKED, | |
| 145 | + WPRProtectRequest_V672::CATEGORY_COUNTRY_BLOCKED, | |
| 146 | + WPRProtectRequest_V672::CATEGORY_USER_BLACKLISTED, | |
| 147 | + WPRProtectRequest_V672::CATEGORY_GLOBAL_BOT_BLOCKED | |
| 148 | 148 | ); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | public static function whitelistedCategories() { |
| 152 | - return array(WPRProtectRequest_V669::CATEGORY_WHITELISTED); | |
| 152 | + return array(WPRProtectRequest_V672::CATEGORY_WHITELISTED); | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | public function setRespCode($code) { |
| 156 | 156 | $this->respcode = $code; |
| @@ -486,9 +486,9 @@ | ||
| 486 | 486 | $this->json_params_status = 'raw_body_truncated'; |
| 487 | 487 | return; |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | - $_json_params = WPRProtectUtils_V669::safeDecodeJSON( | |
| 490 | + $_json_params = WPRProtectUtils_V672::safeDecodeJSON( | |
| 491 | 491 | $this->raw_body, |
| 492 | 492 | true, |
| 493 | 493 | $this->max_json_decode_depth |
| 494 | 494 | ); |