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 | callback/wings/protect.php +7 -7 5.68trunk View file →
@@ -1,15 +1,15 @@
1 1 <?php
2 2 if (!defined('ABSPATH')) exit;
3 3
4 -if (!class_exists('BVProtectCallback')) :
4 +if (!class_exists('WPRProtectCallback')) :
5 5 require_once dirname( __FILE__ ) . '/../../protect/lp.php';
6 6
7 -class BVProtectCallback extends BVCallbackBase {
7 +class WPRProtectCallback extends WPRCallbackBase {
8 8 public $db;
9 9 public $settings;
10 10
11 - const PROTECT_WING_VERSION = 1.2;
11 + const PROTECT_WING_VERSION = 1.3;
12 12
13 13 public function __construct($callback_handler) {
14 14 $this->db = $callback_handler->db;
15 15 $this->settings = $callback_handler->settings;
@@ -16,9 +16,9 @@
16 16 }
17 17
18 18 public function serverConfig() {
19 19 return array(
20 - 'software' => $_SERVER['SERVER_SOFTWARE'],
20 + 'software' => WPRHelper::getRawParam('SERVER', 'SERVER_SOFTWARE'),
21 21 'sapi' => (function_exists('php_sapi_name')) ? php_sapi_name() : false,
22 22 'has_apache_get_modules' => function_exists('apache_get_modules'),
23 23 'posix_getuid' => (function_exists('posix_getuid')) ? posix_getuid() : null,
24 24 'uid' => (function_exists('getmyuid')) ? getmyuid() : null,
@@ -39,9 +39,9 @@
39 39 return $this->settings->getTransient('bvlp_block_logins');
40 40 }
41 41
42 42 public function unBlockIP($ip, $attempts, $time) {
43 - $transient_name = WPRProtectLP_V568::UNBLOCK_IP_TRANSIENT_PREFIX . $ip;
43 + $transient_name = WPRProtectLP_V672::UNBLOCK_IP_TRANSIENT_PREFIX . $ip;
44 44 $this->settings->setTransient($transient_name, $attempts, $time);
45 45 return $this->settings->getTransient($transient_name);
46 46 }
47 47
@@ -56,9 +56,9 @@
56 56 $hdrsinfo = array();
57 57 if ($headers && is_array($headers)) {
58 58 foreach($headers as $hdr) {
59 59 if (array_key_exists($hdr, $_SERVER)) {
60 - $hdrsinfo[$hdr] = $_SERVER[$hdr];
60 + $hdrsinfo[$hdr] = WPRHelper::getRawParam('SERVER', $hdr);
61 61 }
62 62 }
63 63 }
64 64 $resp["hdrsinfo"] = $hdrsinfo;
@@ -74,9 +74,9 @@
74 74 $this->settings->updateOption('bvruleset', $params['conf']);
75 75 $resp = array('conf' => $this->settings->getOption('bvruleset'));
76 76 break;
77 77 case "gtraddr":
78 - $raddr = array_key_exists('REMOTE_ADDR', $_SERVER) ? $_SERVER['REMOTE_ADDR'] : false;
78 + $raddr = WPRHelper::getRawParam('SERVER', 'REMOTE_ADDR');
79 79 $resp = array("raddr" => $raddr);
80 80 break;
81 81 case "svrcnf":
82 82 $resp = array("serverconfig" => $this->serverConfig());