Shield Security for WordPress - Version 6.2.2

Version Description

  • Current Release = Released: 2nd February January, 2018 - Release Notes

  • (v.2) FIXED: Fix for IP Manager PHP error.

  • (v.2) IMPROVED: Two-factor verification email.

Download this release

Release Info

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

Code changes from version 6.2.1 to 6.2.2

icwp-plugin-controller.php CHANGED
@@ -1049,7 +1049,7 @@ class ICWP_WPSF_Plugin_Controller extends ICWP_WPSF_Foundation {
1049
  * @return bool
1050
  */
1051
  protected function getIsPluginFormSubmit() {
1052
- if ( empty( $_POST ) && empty( $_GET ) ) {
1053
  return false;
1054
  }
1055
 
1049
  * @return bool
1050
  */
1051
  protected function getIsPluginFormSubmit() {
1052
+ if ( $this->loadWp()->isAjax() || ( empty( $_POST ) && empty( $_GET ) ) ) {
1053
  return false;
1054
  }
1055
 
icwp-wpsf.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Shield Security
4
  * Plugin URI: http://icwp.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
- * Version: 6.2.1
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages/
9
  * Author: iControlWP
3
  * Plugin Name: Shield Security
4
  * Plugin URI: http://icwp.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
+ * Version: 6.2.2
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages/
9
  * Author: iControlWP
plugin-spec.php CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "properties": {
3
- "version": "6.2.1",
4
- "release_timestamp": 1517486400,
5
  "slug_parent": "icwp",
6
  "slug_plugin": "wpsf",
7
  "human_name": "Shield",
1
  {
2
  "properties": {
3
+ "version": "6.2.2",
4
+ "release_timestamp": 1517572800,
5
  "slug_parent": "icwp",
6
  "slug_plugin": "wpsf",
7
  "human_name": "Shield",
readme.txt CHANGED
@@ -6,7 +6,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: security, all in one, protect, spam, scan, recaptcha, two-factor authentication, login, 2FA, ithemes, wordfence, better wp security, all-in-one, lockdown, hack
7
  Requires at least: 3.5.0
8
  Tested up to: 4.9
9
- Stable tag: 6.2.1
10
 
11
  Free All-In-One Protection for your data, reputation, and users on your WordPress sites - the Highest-Rated Security Plugin for WordPress
12
 
@@ -356,20 +356,17 @@ Technical support, and some newer options and features will not be available to
356
 
357
  You can [go Pro for just $1/month](http://icwp.io/aa). Technical support is available to premium clients only.
358
 
359
- = 6.2.1 - Current Release =
360
- *Released: 1st February January, 2018* - [Release Notes](http://icwp.io/b6)
361
 
362
- * **(v.1)** FIXED: Bug where administrator login email notification setting is not being honoured.
363
- * **(v.1)** IMPROVED: If a site is having trouble with database creation, User Sessions wont lock you out.
364
- * **(v.0)** IMPROVED: Major overhaul of the Shield User Sessions system.
365
- * **(v.0)** IMPROVED: Link the Security Admin authentication with the new Sessions system.
366
- * **(v.0)** IMPROVED: Major overhaul to plugin's user meta data storage, limiting to a single DB entry for all data.
367
- * **(v.0)** ADDED: [**PRO**] Ability to [increase frequency](http://icwp.io/b7) of file system scans up to once every hour.
368
- * **(v.0)** ADDED: [**PRO**] Add a [remember me option](http://icwp.io/b8), allowing users to skip Multi-factor authentication for a set number of days.
369
 
370
  = 6.2 Series =
371
  *Released: 31st January, 2018* - [Release Notes](http://icwp.io/b6)
372
 
 
 
373
  * **(v.1)** FIXED: Bug where administrator login email notification setting is not being honoured.
374
  * **(v.1)** IMPROVED: If a site is having trouble with database creation, User Sessions wont lock you out.
375
  * **(v.0)** IMPROVED: Major overhaul of the Shield User Sessions system.
6
  Tags: security, all in one, protect, spam, scan, recaptcha, two-factor authentication, login, 2FA, ithemes, wordfence, better wp security, all-in-one, lockdown, hack
7
  Requires at least: 3.5.0
8
  Tested up to: 4.9
9
+ Stable tag: 6.2.2
10
 
11
  Free All-In-One Protection for your data, reputation, and users on your WordPress sites - the Highest-Rated Security Plugin for WordPress
12
 
356
 
357
  You can [go Pro for just $1/month](http://icwp.io/aa). Technical support is available to premium clients only.
358
 
359
+ = 6.2.2 - Current Release =
360
+ *Released: 2nd February January, 2018* - [Release Notes](http://icwp.io/b6)
361
 
362
+ * **(v.2)** FIXED: Fix for IP Manager PHP error.
363
+ * **(v.2)** IMPROVED: Two-factor verification email.
 
 
 
 
 
364
 
365
  = 6.2 Series =
366
  *Released: 31st January, 2018* - [Release Notes](http://icwp.io/b6)
367
 
368
+ * **(v.2)** FIXED: Fix for IP Manager PHP error.
369
+ * **(v.2)** IMPROVED: Two-factor verification email.
370
  * **(v.1)** FIXED: Bug where administrator login email notification setting is not being honoured.
371
  * **(v.1)** IMPROVED: If a site is having trouble with database creation, User Sessions wont lock you out.
372
  * **(v.0)** IMPROVED: Major overhaul of the Shield User Sessions system.
src/features/base.php CHANGED
@@ -1224,6 +1224,13 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends ICWP_WPSF_Foundation {
1224
  return $this->loadDP()->query( 'page' ) == $this->getModSlug();
1225
  }
1226
 
 
 
 
 
 
 
 
1227
  /**
1228
  * @return bool
1229
  */
1224
  return $this->loadDP()->query( 'page' ) == $this->getModSlug();
1225
  }
1226
 
1227
+ /**
1228
+ * @return bool
1229
+ */
1230
+ protected function isModuleOptionsRequest() {
1231
+ return $this->loadDP()->post( 'mod_slug' ) === $this->getModSlug();
1232
+ }
1233
+
1234
  /**
1235
  * @return bool
1236
  */
src/features/base_wpsf.php CHANGED
@@ -21,10 +21,11 @@ class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
21
  }
22
 
23
  /**
24
- * @return ICWP_WPSF_SessionVO
25
  */
26
  public function getSession() {
27
- return $this->getSessionsProcessor()->getCurrentSession();
 
28
  }
29
 
30
  /**
21
  }
22
 
23
  /**
24
+ * @return ICWP_WPSF_SessionVO|null
25
  */
26
  public function getSession() {
27
+ $oP = $this->getSessionsProcessor();
28
+ return is_null( $oP ) ? null : $oP->getCurrentSession();
29
  }
30
 
31
  /**
src/features/ips.php CHANGED
@@ -8,6 +8,10 @@ require_once( dirname( __FILE__ ).DIRECTORY_SEPARATOR.'base_wpsf.php' );
8
 
9
  class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
10
 
 
 
 
 
11
  /**
12
  * @return string
13
  */
@@ -215,7 +219,7 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
215
  $oWp = $this->loadWp();
216
  $aRenderData = array(
217
  'list_id' => $sListToRender,
218
- 'bIsWhiteList' => $sListToRender == ICWP_WPSF_Processor_Ips::LIST_MANUAL_WHITE,
219
  'time_now' => sprintf( _wpsf__( 'now: %s' ), $oWp->getTimeStringForDisplay() ),
220
  'sAjaxNonce' => wp_create_nonce( 'fable_ip_list_action' ),
221
  'sTableId' => 'IpTable'.substr( md5( mt_rand() ), 0, 5 )
@@ -224,11 +228,11 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
224
  switch ( $sListToRender ) {
225
 
226
  // this is a hard-coded class... need to change this. It was $oProcessor:: but 5.2 doesn't supprt.
227
- case ICWP_WPSF_Processor_Ips::LIST_MANUAL_WHITE :
228
  $aRenderData[ 'list_data' ] = $this->getFormatedData_WhiteList();
229
  break;
230
 
231
- case ICWP_WPSF_Processor_Ips::LIST_AUTO_BLACK :
232
  $aRenderData[ 'list_data' ] = $this->getFormatedData_AutoBlackList();
233
  break;
234
 
8
 
9
  class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
10
 
11
+ const LIST_MANUAL_WHITE = 'MW';
12
+ const LIST_MANUAL_BLACK = 'MB';
13
+ const LIST_AUTO_BLACK = 'AB';
14
+
15
  /**
16
  * @return string
17
  */
219
  $oWp = $this->loadWp();
220
  $aRenderData = array(
221
  'list_id' => $sListToRender,
222
+ 'bIsWhiteList' => $sListToRender == self::LIST_MANUAL_WHITE,
223
  'time_now' => sprintf( _wpsf__( 'now: %s' ), $oWp->getTimeStringForDisplay() ),
224
  'sAjaxNonce' => wp_create_nonce( 'fable_ip_list_action' ),
225
  'sTableId' => 'IpTable'.substr( md5( mt_rand() ), 0, 5 )
228
  switch ( $sListToRender ) {
229
 
230
  // this is a hard-coded class... need to change this. It was $oProcessor:: but 5.2 doesn't supprt.
231
+ case self::LIST_MANUAL_WHITE :
232
  $aRenderData[ 'list_data' ] = $this->getFormatedData_WhiteList();
233
  break;
234
 
235
+ case self::LIST_AUTO_BLACK :
236
  $aRenderData[ 'list_data' ] = $this->getFormatedData_AutoBlackList();
237
  break;
238
 
src/features/login_protect.php CHANGED
@@ -20,6 +20,19 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
20
  if ( $oDp->query( 'authkey' ) == $this->getCanEmailVerifyCode() ) {
21
  $this->setIfCanSendEmail( true )
22
  ->savePluginOptions();
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  $this->loadWp()->doRedirect( $this->getUrl_AdminPage() );
24
  }
25
  }
@@ -47,7 +60,7 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
47
  * $oWp->resavePermalinks();
48
  * }
49
  */
50
- if ( $this->getIsEmailAuthenticationOptionOn() && !$this->getIfCanSendEmailVerified() ) {
51
  $this->setIfCanSendEmail( false )
52
  ->sendEmailVerifyCanSend();
53
  }
@@ -100,25 +113,22 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
100
  $sEmail = get_bloginfo( 'admin_email' );
101
  }
102
 
 
 
 
 
 
 
103
  if ( $bSendAsLink ) {
104
- $sVerify = $this->generateCanSendEmailVerifyLink();
105
  }
106
  else {
107
- $sVerify = $this->getCanEmailVerifyCode();
108
  }
109
 
110
- $aMessage = array(
111
- _wpsf__( 'Before enabling 2-factor email authentication for your WordPress site, you must verify you can receive this email.' ),
112
- _wpsf__( 'This verifies your website can send email and that your account can receive emails sent from your site.' ),
113
-
114
- sprintf( _wpsf__( "Using the guided wizard? Here's your code: %s" ), $sVerify ),
115
- sprintf( _wpsf__( 'Or click the verify link: %s' ), $this->generateCanSendEmailVerifyLink() ),
116
- );
117
  $sEmailSubject = sprintf( _wpsf__( 'Email Sending Verification For %s' ), $this->loadWp()->getHomeUrl() );
118
-
119
- $bResult = $this->getEmailProcessor()
120
- ->sendEmailTo( $sEmail, $sEmailSubject, $aMessage );
121
- return $bResult;
122
  }
123
 
124
  /**
20
  if ( $oDp->query( 'authkey' ) == $this->getCanEmailVerifyCode() ) {
21
  $this->setIfCanSendEmail( true )
22
  ->savePluginOptions();
23
+
24
+ $oNoticer = $this->loadAdminNoticesProcessor();
25
+ if ( $this->getIfCanSendEmailVerified() ) {
26
+ $oNoticer->addFlashMessage(
27
+ _wpsf__( 'Email verification completed successfully.' )
28
+ );
29
+ }
30
+ else {
31
+ $oNoticer->addFlashErrorMessage(
32
+ _wpsf__( 'Email verification could not be completed.' )
33
+ );
34
+ }
35
+
36
  $this->loadWp()->doRedirect( $this->getUrl_AdminPage() );
37
  }
38
  }
60
  * $oWp->resavePermalinks();
61
  * }
62
  */
63
+ if ( $this->isModuleOptionsRequest() && $this->getIsEmailAuthenticationOptionOn() && !$this->getIfCanSendEmailVerified() ) {
64
  $this->setIfCanSendEmail( false )
65
  ->sendEmailVerifyCanSend();
66
  }
113
  $sEmail = get_bloginfo( 'admin_email' );
114
  }
115
 
116
+ $aMessage = array(
117
+ _wpsf__( 'Before enabling 2-factor email authentication for your WordPress site, you must verify you can receive this email.' ),
118
+ _wpsf__( 'This verifies your website can send email and that your account can receive emails sent from your site.' ),
119
+ ''
120
+ );
121
+
122
  if ( $bSendAsLink ) {
123
+ $aMessage[] = sprintf( _wpsf__( 'Click the verify link: %s' ), $this->generateCanSendEmailVerifyLink() );
124
  }
125
  else {
126
+ $aMessage[] = sprintf( _wpsf__( "Here's your code for the guided wizard: %s" ), $this->getCanEmailVerifyCode() );
127
  }
128
 
 
 
 
 
 
 
 
129
  $sEmailSubject = sprintf( _wpsf__( 'Email Sending Verification For %s' ), $this->loadWp()->getHomeUrl() );
130
+ return $this->getEmailProcessor()
131
+ ->sendEmailTo( $sEmail, $sEmailSubject, $aMessage );
 
 
132
  }
133
 
134
  /**
src/processors/ips.php CHANGED
@@ -8,6 +8,7 @@ require_once( dirname( __FILE__ ).DIRECTORY_SEPARATOR.'basedb.php' );
8
 
9
  class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
10
 
 
11
  const LIST_MANUAL_WHITE = 'MW';
12
  const LIST_MANUAL_BLACK = 'MB';
13
  const LIST_AUTO_BLACK = 'AB';
@@ -122,7 +123,11 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
122
  * @return array
123
  */
124
  public function getAllValidLists() {
125
- return array( self::LIST_AUTO_BLACK, self::LIST_MANUAL_WHITE, self::LIST_MANUAL_BLACK );
 
 
 
 
126
  }
127
 
128
  /**
@@ -335,7 +340,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
335
  */
336
  public function getIsIpOnWhiteList( $sIp, $bReturnListData = false ) {
337
 
338
- $aIpData = $this->getIpListData( $sIp, array( self::LIST_MANUAL_WHITE ) );
339
  $bOnList = count( $aIpData ) > 0;
340
 
341
  return ( $bOnList && $bReturnListData ) ? $aIpData : $bOnList;
@@ -348,7 +353,10 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
348
  */
349
  public function getIsIpOnBlackLists( $sIp, $bReturnListData = false ) {
350
 
351
- $aIpData = $this->getIpListData( $sIp, array( self::LIST_AUTO_BLACK, self::LIST_MANUAL_BLACK ) );
 
 
 
352
  $bOnList = count( $aIpData ) > 0;
353
 
354
  return ( $bOnList && $bReturnListData ) ? $aIpData : $bOnList;
@@ -361,7 +369,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
361
  */
362
  public function getIsIpOnManualBlackList( $sIp, $bReturnListData = false ) {
363
 
364
- $aIpData = $this->getIpListData( $sIp, array( self::LIST_MANUAL_BLACK ) );
365
  $bOnList = count( $aIpData ) > 0;
366
 
367
  return ( ( $bOnList && $bReturnListData ) ? $aIpData : $bOnList );
@@ -404,7 +412,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
404
  * @return array
405
  */
406
  public function getWhitelistData() {
407
- $aData = $this->query_getListData( array( self::LIST_MANUAL_WHITE ) );
408
  return $aData;
409
  }
410
 
@@ -412,7 +420,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
412
  * @return array
413
  */
414
  public function getAutoBlacklistData() {
415
- $aData = $this->query_getListData( array( self::LIST_AUTO_BLACK ) );
416
  return $aData;
417
  }
418
 
@@ -476,7 +484,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
476
  $aNewData = array();
477
  $aNewData[ 'ip' ] = $sIp;
478
  $aNewData[ 'label' ] = empty( $sLabel ) ? _wpsf__( 'No Label' ) : $sLabel;
479
- $aNewData[ 'list' ] = self::LIST_MANUAL_WHITE;
480
  $aNewData[ 'ip6' ] = $this->loadIpService()->getIpVersion( $sIp ) == 6;
481
  $aNewData[ 'transgressions' ] = 0;
482
  $aNewData[ 'is_range' ] = strpos( $sIp, '/' ) !== false;
@@ -494,13 +502,13 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
494
  protected function query_addNewAutoBlackListIp( $sIp ) {
495
 
496
  // Ensure we delete any previous old entries as we go.
497
- $this->query_deleteIpFromList( $sIp, self::LIST_AUTO_BLACK );
498
 
499
  // Now add new entry
500
  $aNewData = array();
501
  $aNewData[ 'ip' ] = $sIp;
502
  $aNewData[ 'label' ] = 'auto';
503
- $aNewData[ 'list' ] = self::LIST_AUTO_BLACK;
504
  $aNewData[ 'ip6' ] = $this->loadIpService()->getIpVersion( $sIp ) == 6;
505
  $aNewData[ 'transgressions' ] = 1;
506
  $aNewData[ 'is_range' ] = 0;
@@ -540,7 +548,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
540
  protected function query_updateLastAccessForAutoBlackListIp( $sIp ) {
541
  $aCurrentData = array(
542
  'ip' => $sIp,
543
- 'list' => self::LIST_AUTO_BLACK
544
  );
545
  $aUpdated = array( 'last_access_at' => $this->time() );
546
  return $this->updateRowsWhere( $aUpdated, $aCurrentData );
@@ -586,7 +594,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
586
  $sQuery = sprintf( $sQuery,
587
  $this->getTableName(),
588
  esc_sql( $sIp ),
589
- self::LIST_MANUAL_WHITE
590
  );
591
  $mResult = $this->selectCustom( $sQuery );
592
  return ( is_array( $mResult ) && isset( $mResult[ 0 ] ) ) ? $mResult[ 0 ] : array();
@@ -615,7 +623,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
615
  $sQuery = sprintf( $sQuery,
616
  $this->getTableName(),
617
  esc_sql( $sIp ),
618
- self::LIST_AUTO_BLACK,
619
  esc_sql( $nTransgressionLimit ),
620
  esc_sql( $nSince )
621
  );
@@ -691,7 +699,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
691
  $sQuery = sprintf( $sQuery,
692
  $this->getTableName(),
693
  esc_sql( $nTimeStamp ),
694
- self::LIST_AUTO_BLACK
695
  );
696
  return $this->loadDbProcessor()->doSql( $sQuery );
697
  }
8
 
9
  class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
10
 
11
+ /* Unused */
12
  const LIST_MANUAL_WHITE = 'MW';
13
  const LIST_MANUAL_BLACK = 'MB';
14
  const LIST_AUTO_BLACK = 'AB';
123
  * @return array
124
  */
125
  public function getAllValidLists() {
126
+ return array(
127
+ ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK,
128
+ ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE,
129
+ ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_BLACK
130
+ );
131
  }
132
 
133
  /**
340
  */
341
  public function getIsIpOnWhiteList( $sIp, $bReturnListData = false ) {
342
 
343
+ $aIpData = $this->getIpListData( $sIp, array( ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE ) );
344
  $bOnList = count( $aIpData ) > 0;
345
 
346
  return ( $bOnList && $bReturnListData ) ? $aIpData : $bOnList;
353
  */
354
  public function getIsIpOnBlackLists( $sIp, $bReturnListData = false ) {
355
 
356
+ $aIpData = $this->getIpListData( $sIp, array(
357
+ ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK,
358
+ ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_BLACK
359
+ ) );
360
  $bOnList = count( $aIpData ) > 0;
361
 
362
  return ( $bOnList && $bReturnListData ) ? $aIpData : $bOnList;
369
  */
370
  public function getIsIpOnManualBlackList( $sIp, $bReturnListData = false ) {
371
 
372
+ $aIpData = $this->getIpListData( $sIp, array( ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_BLACK ) );
373
  $bOnList = count( $aIpData ) > 0;
374
 
375
  return ( ( $bOnList && $bReturnListData ) ? $aIpData : $bOnList );
412
  * @return array
413
  */
414
  public function getWhitelistData() {
415
+ $aData = $this->query_getListData( array( ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE ) );
416
  return $aData;
417
  }
418
 
420
  * @return array
421
  */
422
  public function getAutoBlacklistData() {
423
+ $aData = $this->query_getListData( array( ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK ) );
424
  return $aData;
425
  }
426
 
484
  $aNewData = array();
485
  $aNewData[ 'ip' ] = $sIp;
486
  $aNewData[ 'label' ] = empty( $sLabel ) ? _wpsf__( 'No Label' ) : $sLabel;
487
+ $aNewData[ 'list' ] = ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE;
488
  $aNewData[ 'ip6' ] = $this->loadIpService()->getIpVersion( $sIp ) == 6;
489
  $aNewData[ 'transgressions' ] = 0;
490
  $aNewData[ 'is_range' ] = strpos( $sIp, '/' ) !== false;
502
  protected function query_addNewAutoBlackListIp( $sIp ) {
503
 
504
  // Ensure we delete any previous old entries as we go.
505
+ $this->query_deleteIpFromList( $sIp, ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK );
506
 
507
  // Now add new entry
508
  $aNewData = array();
509
  $aNewData[ 'ip' ] = $sIp;
510
  $aNewData[ 'label' ] = 'auto';
511
+ $aNewData[ 'list' ] = ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK;
512
  $aNewData[ 'ip6' ] = $this->loadIpService()->getIpVersion( $sIp ) == 6;
513
  $aNewData[ 'transgressions' ] = 1;
514
  $aNewData[ 'is_range' ] = 0;
548
  protected function query_updateLastAccessForAutoBlackListIp( $sIp ) {
549
  $aCurrentData = array(
550
  'ip' => $sIp,
551
+ 'list' => ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK
552
  );
553
  $aUpdated = array( 'last_access_at' => $this->time() );
554
  return $this->updateRowsWhere( $aUpdated, $aCurrentData );
594
  $sQuery = sprintf( $sQuery,
595
  $this->getTableName(),
596
  esc_sql( $sIp ),
597
+ ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE
598
  );
599
  $mResult = $this->selectCustom( $sQuery );
600
  return ( is_array( $mResult ) && isset( $mResult[ 0 ] ) ) ? $mResult[ 0 ] : array();
623
  $sQuery = sprintf( $sQuery,
624
  $this->getTableName(),
625
  esc_sql( $sIp ),
626
+ ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK,
627
  esc_sql( $nTransgressionLimit ),
628
  esc_sql( $nSince )
629
  );
699
  $sQuery = sprintf( $sQuery,
700
  $this->getTableName(),
701
  esc_sql( $nTimeStamp ),
702
+ ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK
703
  );
704
  return $this->loadDbProcessor()->doSql( $sQuery );
705
  }