Shield Security for WordPress - Version 10.1.1

Version Description

Download this release

Release Info

Developer paultgoodchild
Plugin Icon 128x128 Shield Security for WordPress
Version 10.1.1
Comparing to
See all releases

Code changes from version 10.1.0 to 10.1.1

cl.json CHANGED
@@ -67,6 +67,14 @@
67
  "description": [
68
  "With some feedback and suggestions provided by clients, we've improved our Shield Overview design."
69
  ]
 
 
 
 
 
 
 
 
70
  }
71
  ]
72
  },
67
  "description": [
68
  "With some feedback and suggestions provided by clients, we've improved our Shield Overview design."
69
  ]
70
+ },
71
+ {
72
+ "type": "fixed",
73
+ "title": "iControlWP Whitelist",
74
+ "description": [
75
+ "Fix to ensure iControlWP is properly whitelisted."
76
+ ],
77
+ "patch": "10.1.1"
78
  }
79
  ]
80
  },
icwp-wpsf.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Shield Security
4
  * Plugin URI: https://shsec.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
- * Version: 10.1.0
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages
9
  * Author: Shield Security
3
  * Plugin Name: Shield Security
4
  * Plugin URI: https://shsec.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
+ * Version: 10.1.1
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages
9
  * Author: Shield Security
plugin-spec.php CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "properties": {
3
- "version": "10.1.0",
4
- "release_timestamp": 1605606920,
5
- "build": "202011.1701",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield",
1
  {
2
  "properties": {
3
+ "version": "10.1.1",
4
+ "release_timestamp": 1605630714,
5
+ "build": "202011.1702",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield",
readme.txt CHANGED
@@ -8,7 +8,7 @@ Requires at least: 3.5.2
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.5
11
- Stable tag: 10.1.0
12
 
13
  The highest rated WordPress Security plugin, delivering unparalleled, all-in-one protection for you and your customers.
14
 
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.5
11
+ Stable tag: 10.1.1
12
 
13
  The highest rated WordPress Security plugin, delivering unparalleled, all-in-one protection for you and your customers.
14
 
src/lib/src/Modules/BaseShield/ModCon.php CHANGED
@@ -195,13 +195,22 @@ class ModCon extends Base\ModCon {
195
 
196
  public function isVisitorWhitelisted() :bool {
197
  if ( !isset( self::$bVisitorIsWhitelisted ) ) {
 
 
 
 
 
 
 
 
198
  self::$bVisitorIsWhitelisted =
199
- ( new Shield\Modules\IPs\Lib\Ops\LookupIpOnList() )
200
- ->setDbHandler( $this->getCon()->getModule_IPs()->getDbHandler_IPs() )
201
- ->setIP( Services::IP()->getRequestIp() )
202
- ->setListTypeWhite()
203
- ->lookup()
204
- instanceof Shield\Databases\IPs\EntryVO;
 
205
  }
206
  return self::$bVisitorIsWhitelisted;
207
  }
195
 
196
  public function isVisitorWhitelisted() :bool {
197
  if ( !isset( self::$bVisitorIsWhitelisted ) ) {
198
+ try {
199
+ $ipID = ( new IpIdentify( (string)Services::IP()->getRequestIp() ) )->run();
200
+ $ipID = key( $ipID );
201
+ }
202
+ catch ( \Exception $e ) {
203
+ $ipID = IpIdentify::UNKNOWN;
204
+ }
205
+
206
  self::$bVisitorIsWhitelisted =
207
+ in_array( $ipID, [ IpIdentify::ICONTROLWP ] )
208
+ || ( new Shield\Modules\IPs\Lib\Ops\LookupIpOnList() )
209
+ ->setDbHandler( $this->getCon()->getModule_IPs()->getDbHandler_IPs() )
210
+ ->setIP( Services::IP()->getRequestIp() )
211
+ ->setListTypeWhite()
212
+ ->lookup()
213
+ instanceof Shield\Databases\IPs\EntryVO;
214
  }
215
  return self::$bVisitorIsWhitelisted;
216
  }
src/lib/src/Modules/BaseShield/UI.php CHANGED
@@ -2,15 +2,15 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield;
4
 
5
- use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
6
  use FernleafSystems\Wordpress\Plugin\Shield;
 
7
  use FernleafSystems\Wordpress\Services\Services;
8
 
9
  class UI extends Base\UI {
10
 
11
  public function getBaseDisplayData() :array {
12
  $con = $this->getCon();
13
- /** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $mod */
14
  $mod = $this->getMod();
15
 
16
  return Services::DataManipulation()->mergeArraysRecursive(
@@ -39,7 +39,9 @@ class UI extends Base\UI {
39
  'sec_admin_login' => $mod->getSecAdminLoginAjaxData(),
40
  ],
41
  'flags' => [
42
- 'has_session' => $mod->hasSession()
 
 
43
  ],
44
  'hrefs' => [
45
  'aar_forget_key' => $con->getModule_SecAdmin()->isWlEnabled() ?
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield;
4
 
 
5
  use FernleafSystems\Wordpress\Plugin\Shield;
6
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
7
  use FernleafSystems\Wordpress\Services\Services;
8
 
9
  class UI extends Base\UI {
10
 
11
  public function getBaseDisplayData() :array {
12
  $con = $this->getCon();
13
+ /** @var ModCon $mod */
14
  $mod = $this->getMod();
15
 
16
  return Services::DataManipulation()->mergeArraysRecursive(
39
  'sec_admin_login' => $mod->getSecAdminLoginAjaxData(),
40
  ],
41
  'flags' => [
42
+ 'has_session' => $con->getModule_Sessions()
43
+ ->getSessionCon()
44
+ ->hasSession()
45
  ],
46
  'hrefs' => [
47
  'aar_forget_key' => $con->getModule_SecAdmin()->isWlEnabled() ?
src/lib/src/Utilities/HCaptcha/TestRequest.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\HCaptcha;
4
 
 
5
  use FernleafSystems\Wordpress\Services\Services;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Utilities\ReCaptcha;
7
 
@@ -14,8 +15,8 @@ class TestRequest extends ReCaptcha\TestRequest {
14
  * @throws \Exception
15
  */
16
  protected function runTest() {
17
- /** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oMod */
18
- $oMod = $this->getMod();
19
 
20
  $sCaptchaResponse = Services::Request()->post( 'h-captcha-response' );
21
 
@@ -26,7 +27,7 @@ class TestRequest extends ReCaptcha\TestRequest {
26
  $oHTTP = Services::HttpRequest();
27
  $bSuccess = $oHTTP->post( self::URL_VERIFY, [
28
  'body' => [
29
- 'secret' => $oMod->getCaptchaCfg()->secret,
30
  'response' => $sCaptchaResponse,
31
  'remoteip' => Services::IP()->getRequestIp(),
32
  ]
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\HCaptcha;
4
 
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base\ModCon;
6
  use FernleafSystems\Wordpress\Services\Services;
7
  use FernleafSystems\Wordpress\Plugin\Shield\Utilities\ReCaptcha;
8
 
15
  * @throws \Exception
16
  */
17
  protected function runTest() {
18
+ /** @var ModCon $mod */
19
+ $mod = $this->getMod();
20
 
21
  $sCaptchaResponse = Services::Request()->post( 'h-captcha-response' );
22
 
27
  $oHTTP = Services::HttpRequest();
28
  $bSuccess = $oHTTP->post( self::URL_VERIFY, [
29
  'body' => [
30
+ 'secret' => $mod->getCaptchaCfg()->secret,
31
  'response' => $sCaptchaResponse,
32
  'remoteip' => Services::IP()->getRequestIp(),
33
  ]
src/lib/src/Utilities/ReCaptcha/Enqueue.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\ReCaptcha;
4
 
 
5
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
6
  use FernleafSystems\Wordpress\Services\Services;
7
 
@@ -23,7 +24,7 @@ class Enqueue {
23
  }
24
 
25
  public function onWpEnqueueJs() {
26
- /** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oMod */
27
  $oMod = $this->getMod();
28
  $oCFG = $oMod->getCaptchaCfg();
29
 
@@ -62,7 +63,7 @@ class Enqueue {
62
  * @throws \Exception
63
  */
64
  public function maybeDequeueRecaptcha() {
65
- /** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oMod */
66
  $oMod = $this->getMod();
67
  $oCFG = $oMod->getCaptchaCfg();
68
 
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\ReCaptcha;
4
 
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base\ModCon;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
7
  use FernleafSystems\Wordpress\Services\Services;
8
 
24
  }
25
 
26
  public function onWpEnqueueJs() {
27
+ /** @var ModCon $oMod */
28
  $oMod = $this->getMod();
29
  $oCFG = $oMod->getCaptchaCfg();
30
 
63
  * @throws \Exception
64
  */
65
  public function maybeDequeueRecaptcha() {
66
+ /** @var ModCon $oMod */
67
  $oMod = $this->getMod();
68
  $oCFG = $oMod->getCaptchaCfg();
69
 
src/lib/src/Utilities/ReCaptcha/TestRequest.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\ReCaptcha;
4
 
 
5
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
6
  use FernleafSystems\Wordpress\Services\Services;
7
  use ReCaptcha\ReCaptcha;
@@ -31,8 +32,8 @@ class TestRequest {
31
  * @throws \Exception
32
  */
33
  protected function runTest() {
34
- /** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oMod */
35
- $oMod = $this->getMod();
36
 
37
  $sCaptchaResponse = Services::Request()->post( 'g-recaptcha-response' );
38
 
@@ -40,7 +41,7 @@ class TestRequest {
40
  throw new \Exception( __( 'Whoops.', 'wp-simple-firewall' ).' '.__( 'CAPTCHA was not submitted.', 'wp-simple-firewall' ), 1 );
41
  }
42
  else {
43
- $oResponse = ( new ReCaptcha( $oMod->getCaptchaCfg()->secret, new WordpressPost() ) )
44
  ->verify( $sCaptchaResponse, Services::IP()->getRequestIp() );
45
  if ( empty( $oResponse ) || !$oResponse->isSuccess() ) {
46
  $aMsg = [
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\ReCaptcha;
4
 
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base\ModCon;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
7
  use FernleafSystems\Wordpress\Services\Services;
8
  use ReCaptcha\ReCaptcha;
32
  * @throws \Exception
33
  */
34
  protected function runTest() {
35
+ /** @var ModCon $mod */
36
+ $mod = $this->getMod();
37
 
38
  $sCaptchaResponse = Services::Request()->post( 'g-recaptcha-response' );
39
 
41
  throw new \Exception( __( 'Whoops.', 'wp-simple-firewall' ).' '.__( 'CAPTCHA was not submitted.', 'wp-simple-firewall' ), 1 );
42
  }
43
  else {
44
+ $oResponse = ( new ReCaptcha( $mod->getCaptchaCfg()->secret, new WordpressPost() ) )
45
  ->verify( $sCaptchaResponse, Services::IP()->getRequestIp() );
46
  if ( empty( $oResponse ) || !$oResponse->isSuccess() ) {
47
  $aMsg = [
src/processors/audit_trail_auditor.php CHANGED
@@ -2,9 +2,9 @@
2
 
3
  use FernleafSystems\Wordpress\Plugin\Shield;
4
  use FernleafSystems\Wordpress\Plugin\Shield\Databases\AuditTrail;
5
- use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
6
 
7
- class ICWP_WPSF_Processor_AuditTrail_Auditor extends ShieldProcessor {
8
 
9
  /**
10
  * @CENTRAL
2
 
3
  use FernleafSystems\Wordpress\Plugin\Shield;
4
  use FernleafSystems\Wordpress\Plugin\Shield\Databases\AuditTrail;
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\Processor;
6
 
7
+ class ICWP_WPSF_Processor_AuditTrail_Auditor extends Processor {
8
 
9
  /**
10
  * @CENTRAL