Shield Security for WordPress - Version 11.2.4

Version Description

Download this release

Release Info

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

Code changes from version 11.2.3 to 11.2.4

cl.json CHANGED
@@ -95,7 +95,13 @@
95
  "type": "improved",
96
  "title": "Adjust default bot scoring logic to reduce spam.",
97
  "description": [],
98
- "patch": "11.2.3"
 
 
 
 
 
 
99
  }
100
  ]
101
  },
95
  "type": "improved",
96
  "title": "Adjust default bot scoring logic to reduce spam.",
97
  "description": [],
98
+ "patch": "11.2.4"
99
+ },
100
+ {
101
+ "type": "fixed",
102
+ "title": "Some clients reported a fatal error in certain circumstances.",
103
+ "description": [],
104
+ "patch": "11.2.4"
105
  }
106
  ]
107
  },
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: 11.2.3
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: 11.2.4
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": "11.2.3",
4
- "release_timestamp": 1622190000,
5
- "build": "202105.2802",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "11.2.4",
4
+ "release_timestamp": 1622362224,
5
+ "build": "202105.3001",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
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.7
11
- Stable tag: 11.2.3
12
  Security against hackers and brute force bots with firewall, login security hiding and hardening, Antispam, Audit Trail, Live Traffic, and much more...
13
 
14
  == Description ==
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.7
11
+ Stable tag: 11.2.4
12
  Security against hackers and brute force bots with firewall, login security hiding and hardening, Antispam, Audit Trail, Live Traffic, and much more...
13
 
14
  == Description ==
src/config/feature-ips.php CHANGED
@@ -140,7 +140,7 @@
140
  {
141
  "key": "antibot_minimum",
142
  "section": "section_antibot",
143
- "default": 35,
144
  "type": "integer",
145
  "min": 0,
146
  "max": 99,
140
  {
141
  "key": "antibot_minimum",
142
  "section": "section_antibot",
143
+ "default": 45,
144
  "type": "integer",
145
  "min": 0,
146
  "max": 99,
src/lib/src/Modules/IPs/Lib/BlockRequest.php CHANGED
@@ -37,11 +37,11 @@ class BlockRequest extends ExecOnceModConsumer {
37
  }
38
 
39
  private function renderKillPage() {
 
40
  /** @var IPs\ModCon $mod */
41
  $mod = $this->getMod();
42
  /** @var IPs\Options $opts */
43
  $opts = $this->getOptions();
44
- $con = $this->getCon();
45
 
46
  $ip = Services::IP()->getRequestIp();
47
  $timeRemaining = max( floor( $opts->getAutoExpireTime()/60 ), 0 );
@@ -98,6 +98,11 @@ class BlockRequest extends ExecOnceModConsumer {
98
  'is_uaum_permitted' => $canUauMagic,
99
  ],
100
  ];
 
 
 
 
 
101
  Services::WpGeneral()
102
  ->wpDie(
103
  $mod->renderTemplate( '/pages/block/blocklist_die.twig', $data, true )
@@ -108,11 +113,11 @@ class BlockRequest extends ExecOnceModConsumer {
108
  * @return string
109
  */
110
  private function renderEmailMagicLinkContent() {
 
111
  /** @var IPs\ModCon $mod */
112
  $mod = $this->getMod();
113
  /** @var IPs\Options $opts */
114
  $opts = $this->getOptions();
115
- $con = $this->getCon();
116
 
117
  $content = '';
118
 
37
  }
38
 
39
  private function renderKillPage() {
40
+ $con = $this->getCon();
41
  /** @var IPs\ModCon $mod */
42
  $mod = $this->getMod();
43
  /** @var IPs\Options $opts */
44
  $opts = $this->getOptions();
 
45
 
46
  $ip = Services::IP()->getRequestIp();
47
  $timeRemaining = max( floor( $opts->getAutoExpireTime()/60 ), 0 );
98
  'is_uaum_permitted' => $canUauMagic,
99
  ],
100
  ];
101
+
102
+ if ( $con->isPremiumActive() ) {
103
+ $data = apply_filters( 'shield/render_data_block_page', $data );
104
+ }
105
+
106
  Services::WpGeneral()
107
  ->wpDie(
108
  $mod->renderTemplate( '/pages/block/blocklist_die.twig', $data, true )
113
  * @return string
114
  */
115
  private function renderEmailMagicLinkContent() {
116
+ $con = $this->getCon();
117
  /** @var IPs\ModCon $mod */
118
  $mod = $this->getMod();
119
  /** @var IPs\Options $opts */
120
  $opts = $this->getOptions();
 
121
 
122
  $content = '';
123
 
src/lib/src/Modules/IPs/Lib/Bots/Calculator/BuildScores.php CHANGED
@@ -14,15 +14,10 @@ class BuildScores {
14
  public function build() :array {
15
  $scores = [];
16
  foreach ( $this->getAllFields( true ) as $field ) {
17
- $method = 'score_'.$field;
18
- if ( method_exists( $this, $method ) ) {
19
- $scores[ $field ] = $this->{$method}();
20
- }
21
  }
22
  $scores[ 'known' ] = $this->score_known();
23
- if ( Services::Request()->ts() - $this->getRecord()->created_at < 20 ) {
24
- $scores[ 'baseline' ] = 35;
25
- }
26
  return $scores;
27
  }
28
 
@@ -47,6 +42,15 @@ class BuildScores {
47
  return $score;
48
  }
49
 
 
 
 
 
 
 
 
 
 
50
  private function score_bt404() :int {
51
  if ( $this->lastAtTs( __FUNCTION__ ) === 0 ) {
52
  $score = 0;
@@ -287,7 +291,7 @@ class BuildScores {
287
  $botSignalDBH->getTableSchema()->getColumnNames(),
288
  function ( $col ) {
289
  return preg_match( '#_at$#', $col ) &&
290
- !in_array( $col, [ 'updated_at', 'created_at', 'deleted_at' ] );
291
  }
292
  )
293
  );
14
  public function build() :array {
15
  $scores = [];
16
  foreach ( $this->getAllFields( true ) as $field ) {
17
+ $scores[ $field ] = $this->{'score_'.$field}();
 
 
 
18
  }
19
  $scores[ 'known' ] = $this->score_known();
20
+
 
 
21
  return $scores;
22
  }
23
 
42
  return $score;
43
  }
44
 
45
+ private function score_created() :int {
46
+ $score = 0;
47
+ $tsDiff = $this->diffTs( __FUNCTION__ );
48
+ if ( $tsDiff > 3 && $tsDiff < 15 ) {
49
+ $score = 15;
50
+ }
51
+ return $score;
52
+ }
53
+
54
  private function score_bt404() :int {
55
  if ( $this->lastAtTs( __FUNCTION__ ) === 0 ) {
56
  $score = 0;
291
  $botSignalDBH->getTableSchema()->getColumnNames(),
292
  function ( $col ) {
293
  return preg_match( '#_at$#', $col ) &&
294
+ !in_array( $col, [ 'updated_at', 'deleted_at' ] );
295
  }
296
  )
297
  );
src/lib/src/Modules/IPs/Lib/IpAnalyse/BuildDisplay.php CHANGED
@@ -299,7 +299,7 @@ class BuildDisplay {
299
  $column = $scoreKey.'_at';
300
  if ( $scoreValue !== 0 ) {
301
  if ( empty( $record ) || empty( $record->{$column} ) ) {
302
- if ( in_array( $scoreKey, [ 'known', 'baseline' ] ) ) {
303
  $signals[ $scoreKey ] = __( 'N/A', 'wp-simple-firewall' );
304
  }
305
  else {
299
  $column = $scoreKey.'_at';
300
  if ( $scoreValue !== 0 ) {
301
  if ( empty( $record ) || empty( $record->{$column} ) ) {
302
+ if ( in_array( $scoreKey, [ 'known', 'created' ] ) ) {
303
  $signals[ $scoreKey ] = __( 'N/A', 'wp-simple-firewall' );
304
  }
305
  else {
src/lib/src/Modules/IPs/Strings.php CHANGED
@@ -260,7 +260,7 @@ class Strings extends Base\Strings {
260
  */
261
  public function getBotSignalNames() :array {
262
  return [
263
- 'baseline' => __( 'Baseline Starting Score', 'wp-simple-firewall' ),
264
  'known' => __( 'A Known Service Provider/Bot', 'wp-simple-firewall' ),
265
  'notbot' => __( '"Not Bot" Registration', 'wp-simple-firewall' ),
266
  'frontpage' => __( 'Any Frontend Page Visited', 'wp-simple-firewall' ),
260
  */
261
  public function getBotSignalNames() :array {
262
  return [
263
+ 'created' => __( 'New Visitor Bonus', 'wp-simple-firewall' ),
264
  'known' => __( 'A Known Service Provider/Bot', 'wp-simple-firewall' ),
265
  'notbot' => __( '"Not Bot" Registration', 'wp-simple-firewall' ),
266
  'frontpage' => __( 'Any Frontend Page Visited', 'wp-simple-firewall' ),
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Licenses/EddLicenseVO.php CHANGED
@@ -49,12 +49,10 @@ class EddLicenseVO extends DynPropertiesClass {
49
  }
50
 
51
  public function getExpiresAt() :int {
52
- return ( $this->expires == 'lifetime' ) ? PHP_INT_MAX : (int)strtotime( $this->expires );
 
53
  }
54
 
55
- /**
56
- * @return bool
57
- */
58
  public function isExpired() :bool {
59
  return $this->getExpiresAt() < Services::Request()->ts();
60
  }
49
  }
50
 
51
  public function getExpiresAt() :int {
52
+ return ( $this->expires == 'lifetime' ) ?
53
+ PHP_INT_MAX : (int)strtotime( (string)$this->expires );
54
  }
55
 
 
 
 
56
  public function isExpired() :bool {
57
  return $this->getExpiresAt() < Services::Request()->ts();
58
  }