Shield Security for WordPress - Version 11.5.2

Version Description

Download this release

Release Info

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

Code changes from version 11.5.1 to 11.5.2

cl.json CHANGED
@@ -105,6 +105,12 @@
105
  "title": "Prevent overloading ShieldNET API in some cases.",
106
  "description": [],
107
  "patch": "11.5.1"
 
 
 
 
 
 
108
  }
109
  ]
110
  },
105
  "title": "Prevent overloading ShieldNET API in some cases.",
106
  "description": [],
107
  "patch": "11.5.1"
108
+ },
109
+ {
110
+ "type": "improved",
111
+ "title": "Add some limited details into the Audit Trail entries for scan results.",
112
+ "description": [],
113
+ "patch": "11.5.2"
114
  }
115
  ]
116
  },
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.5.1
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.5.2
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.5.1",
4
- "release_timestamp": 1627565600,
5
- "build": "202107.2901",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "11.5.2",
4
+ "release_timestamp": 1627635788,
5
+ "build": "202107.3001",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
plugin.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "properties": {
3
- "version": "11.5.1",
4
- "release_timestamp": 1627565600,
5
- "build": "202107.2901",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "11.5.2",
4
+ "release_timestamp": 1627635788,
5
+ "build": "202107.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.7
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.8
11
- Stable tag: 11.5.1
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.8
11
+ Stable tag: 11.5.2
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
src/config/feature-hack_protect.php CHANGED
@@ -411,6 +411,8 @@
411
  "*/php_error_log",
412
  "*/mail.log",
413
  "*/php_mail.log",
 
 
414
  "*/sucuri-*.php"
415
  ],
416
  "type": "array",
411
  "*/php_error_log",
412
  "*/mail.log",
413
  "*/php_mail.log",
414
+ "*/.stylelintrc-css.json",
415
+ "*/.stylelintrc.json",
416
  "*/sucuri-*.php"
417
  ],
418
  "type": "array",
src/lib/src/Controller/Controller.php CHANGED
@@ -31,6 +31,8 @@ use FernleafSystems\Wordpress\Services\Utilities\Options\Transient;
31
  * @property bool $user_can_base_permissions
32
  * @property Shield\Modules\Events\Lib\EventsService $service_events
33
  * @property mixed[]|Shield\Modules\Base\ModCon[] $modules
 
 
34
  */
35
  class Controller extends DynPropertiesClass {
36
 
@@ -501,12 +503,11 @@ class Controller extends DynPropertiesClass {
501
  }
502
 
503
  protected function initCrons() {
504
- ( new Shield\Crons\HourlyCron() )
505
- ->setCon( $this )
506
- ->run();
507
- ( new Shield\Crons\DailyCron() )
508
- ->setCon( $this )
509
- ->run();
510
  if ( Services::WpGeneral()->isCron() ) {
511
  ( new Shield\Utilities\Htaccess\RootHtaccess() )
512
  ->setCon( $this )
31
  * @property bool $user_can_base_permissions
32
  * @property Shield\Modules\Events\Lib\EventsService $service_events
33
  * @property mixed[]|Shield\Modules\Base\ModCon[] $modules
34
+ * @property Shield\Crons\HourlyCron $cron_hourly
35
+ * @property Shield\Crons\DailyCron $cron_daily
36
  */
37
  class Controller extends DynPropertiesClass {
38
 
503
  }
504
 
505
  protected function initCrons() {
506
+ $this->cron_hourly = ( new Shield\Crons\HourlyCron() )->setCon( $this );
507
+ $this->cron_hourly->run();
508
+ $this->cron_daily = ( new Shield\Crons\DailyCron() )->setCon( $this );
509
+ $this->cron_daily->run();
510
+
 
511
  if ( Services::WpGeneral()->isCron() ) {
512
  ( new Shield\Utilities\Htaccess\RootHtaccess() )
513
  ->setCon( $this )
src/lib/src/Crons/BaseCron.php CHANGED
@@ -2,11 +2,13 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Crons;
4
 
 
5
  use FernleafSystems\Wordpress\Plugin\Shield;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\PluginControllerConsumer;
7
 
8
  abstract class BaseCron {
9
 
 
10
  use Shield\Crons\StandardCron;
11
  use PluginControllerConsumer;
12
 
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Crons;
4
 
5
+ use FernleafSystems\Utilities\Logic\ExecOnce;
6
  use FernleafSystems\Wordpress\Plugin\Shield;
7
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\PluginControllerConsumer;
8
 
9
  abstract class BaseCron {
10
 
11
+ use ExecOnce;
12
  use Shield\Crons\StandardCron;
13
  use PluginControllerConsumer;
14
 
src/lib/src/Modules/AuditTrail/Lib/AuditMessageBuilder.php CHANGED
@@ -17,7 +17,7 @@ class AuditMessageBuilder {
17
  if ( $missingCount > 0 ) {
18
  $substitutions = array_merge(
19
  $substitutions,
20
- array_fill( 0, $missingCount, 'data missing for older audit logs' )
21
  );
22
  }
23
  return stripslashes( sanitize_textarea_field( vsprintf( $rawString, $substitutions ) ) );
17
  if ( $missingCount > 0 ) {
18
  $substitutions = array_merge(
19
  $substitutions,
20
+ array_fill( 0, $missingCount, '[data missing for older audit logs]' )
21
  );
22
  }
23
  return stripslashes( sanitize_textarea_field( vsprintf( $rawString, $substitutions ) ) );
src/lib/src/Modules/HackGuard/Scan/Queue/CompleteQueue.php CHANGED
@@ -46,7 +46,25 @@ class CompleteQueue {
46
  ->update( $resultsSet );
47
 
48
  if ( $resultsSet->countItems() > 0 ) {
49
- $con->fireEvent( $scanSlug.'_scan_found' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
  }
52
 
46
  ->update( $resultsSet );
47
 
48
  if ( $resultsSet->countItems() > 0 ) {
49
+
50
+ $items = $resultsSet->countItems() > 30 ?
51
+ __( 'Only the first 30 items are shown.', 'wp-simple-firewall' )
52
+ : __( 'The following items were discovered.', 'wp-simple-firewall' );
53
+
54
+ $items .= ' "'.
55
+ implode( '", "', array_map( function ( $item ) {
56
+ return $item->getDescriptionForAudit();
57
+ }, array_slice( $resultsSet->getItems(), 0, 30 ) ) )
58
+ .'"';
59
+
60
+ $con->fireEvent(
61
+ $scanSlug.'_scan_found',
62
+ [
63
+ 'audit' => [
64
+ 'items' => $items
65
+ ]
66
+ ]
67
+ );
68
  }
69
  }
70
 
src/lib/src/Modules/HackGuard/Scan/ScansController.php CHANGED
@@ -147,7 +147,7 @@ class ScansController extends ExecOnceModConsumer {
147
  $startHour = 3;
148
  }
149
  if ( $startMinute < 1 || $startMinute > 59 ) {
150
- $startMinute = (int)rand( 0, 59 );
151
  }
152
 
153
  $c = Services::Request()->carbon( true );
147
  $startHour = 3;
148
  }
149
  if ( $startMinute < 1 || $startMinute > 59 ) {
150
+ $startMinute = (int)rand( 1, 59 );
151
  }
152
 
153
  $c = Services::Request()->carbon( true );
src/lib/src/Modules/HackGuard/Strings.php CHANGED
@@ -41,7 +41,8 @@ class Strings extends Base\Strings {
41
  sprintf( '%s: %s',
42
  __( 'Note', 'wp-simple-firewall' ),
43
  __( "These items wont display in results if you've previously marked them as ignored.", 'wp-simple-firewall' )
44
- )
 
45
  ];
46
  $messages[ 'scan_item_delete_success' ] = [
47
  __( 'Deleted item found in the scan.', 'wp-simple-firewall' )
41
  sprintf( '%s: %s',
42
  __( 'Note', 'wp-simple-firewall' ),
43
  __( "These items wont display in results if you've previously marked them as ignored.", 'wp-simple-firewall' )
44
+ ),
45
+ '%s'
46
  ];
47
  $messages[ 'scan_item_delete_success' ] = [
48
  __( 'Deleted item found in the scan.', 'wp-simple-firewall' )
src/lib/src/Scans/Apc/ResultItem.php CHANGED
@@ -11,4 +11,7 @@ namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Apc;
11
  */
12
  class ResultItem extends \FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\ResultItem {
13
 
 
 
 
14
  }
11
  */
12
  class ResultItem extends \FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\ResultItem {
13
 
14
+ public function getDescriptionForAudit() :string {
15
+ return sprintf( '%s: %s', $this->context, $this->slug );
16
+ }
17
  }
src/lib/src/Scans/Base/FileResultItem.php CHANGED
@@ -10,4 +10,7 @@ namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
10
  */
11
  class FileResultItem extends ResultItem {
12
 
 
 
 
13
  }
10
  */
11
  class FileResultItem extends ResultItem {
12
 
13
+ public function getDescriptionForAudit() :string {
14
+ return $this->path_full;
15
+ }
16
  }
src/lib/src/Scans/Base/ResultItem.php CHANGED
@@ -31,6 +31,10 @@ class ResultItem {
31
  return md5( json_encode( $this->getRawData() ) );
32
  }
33
 
 
 
 
 
34
  /**
35
  * @return mixed
36
  */
31
  return md5( json_encode( $this->getRawData() ) );
32
  }
33
 
34
+ public function getDescriptionForAudit() :string {
35
+ return 'No description';
36
+ }
37
+
38
  /**
39
  * @return mixed
40
  */
src/lib/src/Scans/Wpv/ResultItem.php CHANGED
@@ -18,6 +18,10 @@ class ResultItem extends \FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\Res
18
  return md5( $this->slug.$this->wpvuln_id );
19
  }
20
 
 
 
 
 
21
  public function getVulnVo() :VulnVO {
22
  return ( new VulnVO() )->applyFromArray( $this->wpvuln_vo );
23
  }
18
  return md5( $this->slug.$this->wpvuln_id );
19
  }
20
 
21
+ public function getDescriptionForAudit() :string {
22
+ return sprintf( '%s: %s', $this->context, $this->slug );
23
+ }
24
+
25
  public function getVulnVo() :VulnVO {
26
  return ( new VulnVO() )->applyFromArray( $this->wpvuln_vo );
27
  }
src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Cron.php CHANGED
@@ -47,11 +47,9 @@ class Cron {
47
  return $this;
48
  }
49
 
50
- /**
51
- * @return array
52
- */
53
- public function getCrons() {
54
- if ( function_exists( 'wp_get_ready_cron_jobs' ) ) {
55
  $crons = wp_get_ready_cron_jobs();
56
  }
57
  elseif ( function_exists( '_get_cron_array' ) ) {
@@ -60,10 +58,7 @@ class Cron {
60
  return is_array( $crons ) ? $crons : [];
61
  }
62
 
63
- /**
64
- * @return array
65
- */
66
- protected function getSchedules() {
67
  if ( !is_array( $this->aSchedules ) ) {
68
  $this->aSchedules = [];
69
  }
47
  return $this;
48
  }
49
 
50
+ public function getCrons( bool $onlyReadyToRunNow = false ) :array {
51
+ $crons = [];
52
+ if ( $onlyReadyToRunNow && function_exists( 'wp_get_ready_cron_jobs' ) ) {
 
 
53
  $crons = wp_get_ready_cron_jobs();
54
  }
55
  elseif ( function_exists( '_get_cron_array' ) ) {
58
  return is_array( $crons ) ? $crons : [];
59
  }
60
 
61
+ protected function getSchedules() :array {
 
 
 
62
  if ( !is_array( $this->aSchedules ) ) {
63
  $this->aSchedules = [];
64
  }