Shield Security for WordPress - Version 10.2.1

Version Description

Download this release

Release Info

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

Code changes from version 10.2.0 to 10.2.1

cl.json CHANGED
@@ -87,6 +87,14 @@
87
  "description": [
88
  "We upgraded the database table definition to allow for much larger files."
89
  ]
 
 
 
 
 
 
 
 
90
  }
91
  ]
92
  },
87
  "description": [
88
  "We upgraded the database table definition to allow for much larger files."
89
  ]
90
+ },
91
+ {
92
+ "type": "fixed",
93
+ "title": "Plugin Upgrade Code wasn't always running",
94
+ "description": [
95
+ "Code designed to automatically run when the plugin is upgraded between version wasn't always running."
96
+ ],
97
+ "patch": "10.2.1"
98
  }
99
  ]
100
  },
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.2.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.2.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.2.0",
4
- "release_timestamp": 1613037000,
5
- "build": "202102.1107",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
@@ -236,7 +236,7 @@
236
  "9.2.0",
237
  "9.2.2",
238
  "10.1.0",
239
- "10.2.0"
240
  ],
241
  "action_links": {
242
  "remove": null,
1
  {
2
  "properties": {
3
+ "version": "10.2.1",
4
+ "release_timestamp": 1613041550,
5
+ "build": "202102.1102",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
236
  "9.2.0",
237
  "9.2.2",
238
  "10.1.0",
239
+ "10.2.1"
240
  ],
241
  "action_links": {
242
  "remove": null,
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.6
11
- Stable tag: 10.2.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.6
11
+ Stable tag: 10.2.1
12
 
13
  The highest rated WordPress Security plugin, delivering unparalleled, all-in-one protection for you and your customers.
14
 
src/lib/src/Controller/Config/ConfigVO.php CHANGED
@@ -58,12 +58,6 @@ class ConfigVO {
58
  );
59
  break;
60
 
61
- case 'previous_version':
62
- if ( empty( $val ) ) {
63
- $val = $this->properties[ 'version' ];
64
- }
65
- break;
66
-
67
  case 'update_first_detected':
68
  if ( empty( $val ) ) {
69
  $val = [];
58
  );
59
  break;
60
 
 
 
 
 
 
 
61
  case 'update_first_detected':
62
  if ( empty( $val ) ) {
63
  $val = [];
src/lib/src/Controller/Config/Ops/LoadConfig.php CHANGED
@@ -31,12 +31,13 @@ class LoadConfig {
31
  * @throws \Exception
32
  */
33
  public function run() :ConfigVO {
 
34
  $def = $this->fromWp();
35
  $rebuild = empty( $def ) || !is_array( $def );
36
 
37
  $specHash = sha1_file( $this->path );
 
38
  if ( !$rebuild ) {
39
- $con = $this->getCon();
40
  $version = $def[ 'properties' ][ 'version' ] ?? '0';
41
 
42
  $rebuild = empty( $def[ 'hash' ] ) || !hash_equals( $def[ 'hash' ], $specHash )
@@ -44,10 +45,19 @@ class LoadConfig {
44
  $def[ 'hash' ] = $specHash;
45
  }
46
 
47
- $cfg = ( new ConfigVO() )->applyFromArray( $rebuild ? $this->fromFile() : $def );
 
 
 
 
 
48
  $cfg->hash = $specHash;
49
  $cfg->rebuilt = $rebuild;
50
 
 
 
 
 
51
  return $cfg;
52
  }
53
 
31
  * @throws \Exception
32
  */
33
  public function run() :ConfigVO {
34
+ $con = $this->getCon();
35
  $def = $this->fromWp();
36
  $rebuild = empty( $def ) || !is_array( $def );
37
 
38
  $specHash = sha1_file( $this->path );
39
+ $previousVersion = ( is_array( $def ) && !empty( $def[ 'previous_version' ] ) ) ? $def[ 'previous_version' ] : null;
40
  if ( !$rebuild ) {
 
41
  $version = $def[ 'properties' ][ 'version' ] ?? '0';
42
 
43
  $rebuild = empty( $def[ 'hash' ] ) || !hash_equals( $def[ 'hash' ], $specHash )
45
  $def[ 'hash' ] = $specHash;
46
  }
47
 
48
+ if ( $rebuild ) {
49
+ $def = $this->fromFile();
50
+ $def[ 'previous_version' ] = $previousVersion;
51
+ }
52
+
53
+ $cfg = ( new ConfigVO() )->applyFromArray( $def );
54
  $cfg->hash = $specHash;
55
  $cfg->rebuilt = $rebuild;
56
 
57
+ if ( empty( $cfg->previous_version ) ) {
58
+ $cfg->previous_version = $cfg->properties[ 'version' ];
59
+ }
60
+
61
  return $cfg;
62
  }
63
 
src/lib/src/Modules/HackGuard/Upgrade.php CHANGED
@@ -7,7 +7,7 @@ use FernleafSystems\Wordpress\Services\Services;
7
 
8
  class Upgrade extends Base\Upgrade {
9
 
10
- protected function upgrade_1020() {
11
  /** @var ModCon $mod */
12
  $mod = $this->getMod();
13
  $schema = $mod->getDbHandler_FileLocker()->getTableSchema();
7
 
8
  class Upgrade extends Base\Upgrade {
9
 
10
+ protected function upgrade_1021() {
11
  /** @var ModCon $mod */
12
  $mod = $this->getMod();
13
  $schema = $mod->getDbHandler_FileLocker()->getTableSchema();