Shield Security for WordPress - Version 12.0.7

Version Description

Download this release

Release Info

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

Code changes from version 12.0.6 to 12.0.7

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: 12.0.6
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: 12.0.7
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": "12.0.6",
4
- "release_timestamp": 1632392107,
5
- "build": "202109.2302",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "12.0.7",
4
+ "release_timestamp": 1632393194,
5
+ "build": "202109.2303",
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": "12.0.6",
4
- "release_timestamp": 1632392107,
5
- "build": "202109.2302",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "12.0.7",
4
+ "release_timestamp": 1632393194,
5
+ "build": "202109.2303",
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: 12.0.6
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: 12.0.7
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
src/lib/src/Controller/Controller.php CHANGED
@@ -221,12 +221,8 @@ class Controller extends DynPropertiesClass {
221
  $reqsMsg[] = sprintf( 'WordPress does not meet minimum version. Required Version: %s.', $wp );
222
  }
223
 
224
- $mysqlInfo = (string)Services::WpDb()->loadWpdb()->db_server_info();
225
- $mysqlV = preg_replace( '/[^0-9.].*/', '', $mysqlInfo );
226
  $mysql = $this->cfg->requirements[ 'mysql' ];
227
- if ( !empty( $mysql ) && !empty( $mysqlInfo )
228
- && version_compare( $mysqlV, $mysql, '<' )
229
- && ( stripos( $mysqlInfo, 'MariaDB' ) === false ) ) {
230
  $reqsMsg[] = sprintf( "Your MySQL database server doesn't support IPv6 addresses. Your Version: %s; Required MySQL Version: %s;",
231
  Services::WpDb()->loadWpdb()->db_version(), $mysql );
232
  }
@@ -240,6 +236,14 @@ class Controller extends DynPropertiesClass {
240
  }
241
  }
242
 
 
 
 
 
 
 
 
 
243
  public function adminNoticeDoesNotMeetRequirements() {
244
  if ( !empty( $this->reqs_not_met ) ) {
245
  $this->getRenderer()
@@ -625,14 +629,12 @@ class Controller extends DynPropertiesClass {
625
  if ( !empty( $updates->response ) && isset( $updates->response[ $file ] ) ) {
626
  $reqs = $this->cfg->upgrade_reqs;
627
  if ( is_array( $reqs ) ) {
628
- $DB = Services::WpDb();
629
  foreach ( $reqs as $shieldVer => $verReqs ) {
630
  $toHide = version_compare( $updates->response[ $file ]->new_version, $shieldVer, '>=' )
631
  && (
632
  !Services::Data()->getPhpVersionIsAtLeast( $verReqs[ 'php' ] )
633
  || !Services::WpGeneral()->getWordpressIsAtLeastVersion( $verReqs[ 'wp' ] )
634
- || ( !empty( $verReqs[ 'mysql' ] ) &&
635
- version_compare( $DB->loadWpdb()->db_version(), $verReqs[ 'mysql' ], '<' ) )
636
  );
637
  if ( $toHide ) {
638
  unset( $updates->response[ $file ] );
221
  $reqsMsg[] = sprintf( 'WordPress does not meet minimum version. Required Version: %s.', $wp );
222
  }
223
 
 
 
224
  $mysql = $this->cfg->requirements[ 'mysql' ];
225
+ if ( !empty( $mysql ) && !$this->isMysqlVersionSupported( $mysql ) ) {
 
 
226
  $reqsMsg[] = sprintf( "Your MySQL database server doesn't support IPv6 addresses. Your Version: %s; Required MySQL Version: %s;",
227
  Services::WpDb()->loadWpdb()->db_version(), $mysql );
228
  }
236
  }
237
  }
238
 
239
+ private function isMysqlVersionSupported( string $versionToSupport ) :bool {
240
+ $mysqlInfo = (string)Services::WpDb()->loadWpdb()->db_server_info();
241
+ return empty( $versionToSupport )
242
+ || empty( $mysqlInfo )
243
+ || ( stripos( $mysqlInfo, 'MariaDB' ) !== false )
244
+ || version_compare( preg_replace( '/[^0-9.].*/', '', $mysqlInfo ), $versionToSupport, '>=' );
245
+ }
246
+
247
  public function adminNoticeDoesNotMeetRequirements() {
248
  if ( !empty( $this->reqs_not_met ) ) {
249
  $this->getRenderer()
629
  if ( !empty( $updates->response ) && isset( $updates->response[ $file ] ) ) {
630
  $reqs = $this->cfg->upgrade_reqs;
631
  if ( is_array( $reqs ) ) {
 
632
  foreach ( $reqs as $shieldVer => $verReqs ) {
633
  $toHide = version_compare( $updates->response[ $file ]->new_version, $shieldVer, '>=' )
634
  && (
635
  !Services::Data()->getPhpVersionIsAtLeast( $verReqs[ 'php' ] )
636
  || !Services::WpGeneral()->getWordpressIsAtLeastVersion( $verReqs[ 'wp' ] )
637
+ || ( !empty( $verReqs[ 'mysql' ] ) && !$this->isMysqlVersionSupported( $verReqs[ 'mysql' ] ) )
 
638
  );
639
  if ( $toHide ) {
640
  unset( $updates->response[ $file ] );