Shield Security for WordPress - Version 6.7.2

Version Description

  • Current Release = Released: 30th May, 2018 - Release Notes

  • (v.2) ADDED: [PRO] Admin Notes feature - Notes can now be easily deleted (editing will not be possible).

  • (v.0) UPDATED: Some translations.

  • (v.2) FIXED: A few bugs with the Insights Dashboard.

  • (v.2) FIXED: Removed the dependency on jQuery with Invisible reCAPTCHA.

Note: The Insights Dashboard is only available on sites with PHP v5.4.0 and above.

Download this release

Release Info

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

Code changes from version 6.7.1 to 6.7.2

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.7.1
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages/
9
  * Author: One Dollar Plugin
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.7.2
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages/
9
  * Author: One Dollar Plugin
languages/wp-simple-firewall-fi.mo CHANGED
Binary file
languages/wp-simple-firewall-nl_NL.mo CHANGED
Binary file
plugin-spec.php CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "properties": {
3
- "version": "6.7.1",
4
- "release_timestamp": 1526972443,
5
  "slug_parent": "icwp",
6
  "slug_plugin": "wpsf",
7
  "human_name": "Shield",
1
  {
2
  "properties": {
3
+ "version": "6.7.2",
4
+ "release_timestamp": 1527681600,
5
  "slug_parent": "icwp",
6
  "slug_plugin": "wpsf",
7
  "human_name": "Shield",
readme.txt CHANGED
@@ -8,7 +8,7 @@ Requires at least: 3.5.0
8
  Requires PHP: 5.2.4
9
  Recommended PHP: 5.4
10
  Tested up to: 4.9
11
- Stable tag: 6.7.1
12
 
13
  Complete All-In-One Protection for your WordPress sites, that makes Security Easy for Everyone - it doesn't have to be hard anymore.
14
 
@@ -353,23 +353,23 @@ If you don't want to support the work, no problem! You can still continue to use
353
 
354
  You can [go Pro for just $1/month](http://icwp.io/aa).
355
 
356
- = 6.7.1 - Current Release =
357
- *Released: 22nd May, 2018* - [Release Notes](http://icwp.io/cx)
358
 
359
- * **(v.1)** ADDED: [**PRO**] Admin Notes feature - you can add notes to the Shield plugin in the Insights Dashboard.
360
- * **(v.1)** FIXED: A few bugs with the Insights Dashboard.
361
- * **(v.0)** ADDED: A simple test cron to demonstrate whether your site crons are running.
362
- * **(v.0)** ADDED: [**PRO**] Full support for new WordPress GDPR Privacy Policy controls for exporting and erasing data.
363
- * **(v.0)** ADDED: [**PRO**] New GDPR guided wizard for exporting/erasing particular data based on custom search results.
364
- * **(v.0)** CHANGED: Guided Wizards now load through WP admin to fix ajax problems for poorly configured SSL on some sites
365
- * **(v.0)** IMPROVED: Upgraded Bootstrap library to 4.1.1.
366
- * **(v.0)** IMPROVED: Compatibility with AIO Events Cal - they like to force their old Twig libraries on everyone else.
367
 
368
  Note: The Insights Dashboard is only available on sites with PHP v5.4.0 and above.
369
 
370
  = 6.7 Series =
371
  *Released: 21st May, 2018* - [Release Notes](http://icwp.io/cx)
372
 
 
 
 
 
373
  * **(v.1)** FIXED: A few bugs with the Insights Dashboard
374
  * **(v.1)** ADDED: [**PRO**] Admin Notes feature - you can now add notes to the Shield plugin in the Insights Dashboard.
375
  * **(v.0)** ADDED: All-New Insights Dashboard providing a high-level overview of your site security, with recommendations.
8
  Requires PHP: 5.2.4
9
  Recommended PHP: 5.4
10
  Tested up to: 4.9
11
+ Stable tag: 6.7.2
12
 
13
  Complete All-In-One Protection for your WordPress sites, that makes Security Easy for Everyone - it doesn't have to be hard anymore.
14
 
353
 
354
  You can [go Pro for just $1/month](http://icwp.io/aa).
355
 
356
+ = 6.7.2 - Current Release =
357
+ *Released: 30th May, 2018* - [Release Notes](http://icwp.io/cx)
358
 
359
+ * **(v.2)** ADDED: [**PRO**] Admin Notes feature - Notes can now be easily deleted (editing will not be possible).
360
+ * **(v.0)** UPDATED: Some translations.
361
+ * **(v.2)** FIXED: A few bugs with the Insights Dashboard.
362
+ * **(v.2)** FIXED: Removed the dependency on jQuery with Invisible reCAPTCHA.
 
 
 
 
363
 
364
  Note: The Insights Dashboard is only available on sites with PHP v5.4.0 and above.
365
 
366
  = 6.7 Series =
367
  *Released: 21st May, 2018* - [Release Notes](http://icwp.io/cx)
368
 
369
+ * **(v.2)** ADDED: [**PRO**] Admin Notes feature - Notes can now be easily deleted (editing will not be possible).
370
+ * **(v.0)** UPDATED: Some translations.
371
+ * **(v.2)** FIXED: A few bugs with the Insights Dashboard.
372
+ * **(v.2)** FIXED: Removed the dependency on jQuery with Invisible reCAPTCHA.
373
  * **(v.1)** FIXED: A few bugs with the Insights Dashboard
374
  * **(v.1)** ADDED: [**PRO**] Admin Notes feature - you can now add notes to the Shield plugin in the Insights Dashboard.
375
  * **(v.0)** ADDED: All-New Insights Dashboard providing a high-level overview of your site security, with recommendations.
resources/js/plugin.js CHANGED
@@ -100,6 +100,10 @@ var iCWP_WPSF_InsightsAdminNotes = new function () {
100
  function ( oResponse ) {
101
  if ( oResponse.success ) {
102
  jQuery( '#AdminNotesContainer' ).html( oResponse.data.html );
 
 
 
 
103
  }
104
  else {
105
  var sMessage = 'Communications error with site.';
@@ -115,6 +119,32 @@ var iCWP_WPSF_InsightsAdminNotes = new function () {
115
  );
116
  };
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  /**
119
  */
120
  var submitForm = function ( event ) {
@@ -156,6 +186,7 @@ var iCWP_WPSF_InsightsAdminNotes = new function () {
156
  } */
157
  } );
158
  jQuery( document ).on( "submit", "form#NewAdminNote", submitForm );
 
159
  } );
160
  };
161
  }();
100
  function ( oResponse ) {
101
  if ( oResponse.success ) {
102
  jQuery( '#AdminNotesContainer' ).html( oResponse.data.html );
103
+ jQuery( '.cell_delete_note button' ).tooltip( {
104
+ placement: 'left',
105
+ trigger: 'hover'
106
+ } );
107
  }
108
  else {
109
  var sMessage = 'Communications error with site.';
119
  );
120
  };
121
 
122
+ /**
123
+ */
124
+ var deleteNote = function ( event ) {
125
+ iCWP_WPSF_BodyOverlay.show();
126
+
127
+ icwp_wpsf_vars_insights.ajax_admin_notes_delete.note_id = jQuery( this ).data( 'note_id' );
128
+
129
+ jQuery.post( ajaxurl, icwp_wpsf_vars_insights.ajax_admin_notes_delete,
130
+ function ( oResponse ) {
131
+ if ( oResponse.success ) {
132
+ renderNotes();
133
+ }
134
+ else {
135
+ var sMessage = 'Communications error with site.';
136
+ if ( oResponse.data.message !== undefined ) {
137
+ sMessage = oResponse.data.message;
138
+ }
139
+ alert( sMessage );
140
+ iCWP_WPSF_BodyOverlay.hide();
141
+ }
142
+ }
143
+ ).always( function () {
144
+ }
145
+ );
146
+ };
147
+
148
  /**
149
  */
150
  var submitForm = function ( event ) {
186
  } */
187
  } );
188
  jQuery( document ).on( "submit", "form#NewAdminNote", submitForm );
189
+ jQuery( document ).on( "click", ".btn.note_delete", deleteNote );
190
  } );
191
  };
192
  }();
src/features/insights.php CHANGED
@@ -17,13 +17,18 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
17
  $aSecNotices = $this->getNotices();
18
  $aNotes = $this->getNotes();
19
 
 
 
 
 
 
20
  $aData = array(
21
  'vars' => array(
22
  'summary' => $this->getInsightsModsSummary(),
23
  'audit_trail_recent' => $aRecentAuditTrail,
24
  'insight_events' => $this->getRecentEvents(),
25
  'insight_notices' => $aSecNotices,
26
- 'insight_notices_count' => count( $aSecNotices ),
27
  'insight_stats' => $this->getStats(),
28
  'insight_notes' => $aNotes,
29
  ),
@@ -36,6 +41,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
36
  'ajax' => array(
37
  'admin_note_new' => $this->getAjaxActionData( 'admin_note_new' ),
38
  'admin_notes_render' => $this->getAjaxActionData( 'admin_notes_render' ),
 
39
  ),
40
  'hrefs' => array(
41
  'shield_pro_url' => 'http://icwp.io/shieldpro',
@@ -64,6 +70,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
64
  'icwp_wpsf_vars_insights',
65
  array(
66
  'ajax_admin_notes_render' => $this->getAjaxActionData( 'admin_notes_render' ),
 
67
  )
68
  );
69
  }
@@ -82,6 +89,10 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
82
  $aAjaxResponse = $this->ajaxExec_AdminNoteNew();
83
  break;
84
 
 
 
 
 
85
  case 'admin_notes_render':
86
  $aAjaxResponse = $this->ajaxExec_AdminNotesRender();
87
  break;
@@ -111,7 +122,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
111
  }
112
  else {
113
  /** @var ICWP_WPSF_Processor_Plugin $oP */
114
- $oP = $this->getConn()->getModule( 'plugin' )->getProcessor();
115
  $bSuccess = $oP->getSubProcessorNotes()
116
  ->getQueryCreator()
117
  ->create( $sNote ) !== false;
@@ -127,12 +138,29 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
127
  /**
128
  * @return array
129
  */
130
- protected function ajaxExec_AdminNotesRender() {
131
  $oDP = $this->loadDP();
132
  /** @var ICWP_WPSF_FeatureHandler_Plugin $oMod */
133
  $oMod = $this->getConn()->getModule( 'plugin' );
134
- $sNote = trim( $oDP->post( 'admin_note', '' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
 
 
 
 
136
  $aNotes = $this->getNotes();
137
  $sHtml = $this->renderTemplate(
138
  '/wpadmin_pages/insights/admin_notes_table.twig',
@@ -183,7 +211,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
183
  }
184
 
185
  /**
186
- * @return string[]
187
  */
188
  protected function getNotices() {
189
 
@@ -210,7 +238,10 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
210
  'lockdown' => array(),
211
  ),
212
  $aAll
213
- )
 
 
 
214
  );
215
  }
216
 
17
  $aSecNotices = $this->getNotices();
18
  $aNotes = $this->getNotes();
19
 
20
+ $nNoticesCount = 0;
21
+ foreach ( $aSecNotices as $aNoticeSection ) {
22
+ $nNoticesCount += isset( $aNoticeSection[ 'count' ] ) ? $aNoticeSection[ 'count' ] : 0;
23
+ }
24
+
25
  $aData = array(
26
  'vars' => array(
27
  'summary' => $this->getInsightsModsSummary(),
28
  'audit_trail_recent' => $aRecentAuditTrail,
29
  'insight_events' => $this->getRecentEvents(),
30
  'insight_notices' => $aSecNotices,
31
+ 'insight_notices_count' => $nNoticesCount,
32
  'insight_stats' => $this->getStats(),
33
  'insight_notes' => $aNotes,
34
  ),
41
  'ajax' => array(
42
  'admin_note_new' => $this->getAjaxActionData( 'admin_note_new' ),
43
  'admin_notes_render' => $this->getAjaxActionData( 'admin_notes_render' ),
44
+ 'admin_notes_delete' => $this->getAjaxActionData( 'admin_notes_delete' ),
45
  ),
46
  'hrefs' => array(
47
  'shield_pro_url' => 'http://icwp.io/shieldpro',
70
  'icwp_wpsf_vars_insights',
71
  array(
72
  'ajax_admin_notes_render' => $this->getAjaxActionData( 'admin_notes_render' ),
73
+ 'ajax_admin_notes_delete' => $this->getAjaxActionData( 'admin_notes_delete' ),
74
  )
75
  );
76
  }
89
  $aAjaxResponse = $this->ajaxExec_AdminNoteNew();
90
  break;
91
 
92
+ case 'admin_notes_delete':
93
+ $aAjaxResponse = $this->ajaxExec_AdminNotesDelete();
94
+ break;
95
+
96
  case 'admin_notes_render':
97
  $aAjaxResponse = $this->ajaxExec_AdminNotesRender();
98
  break;
122
  }
123
  else {
124
  /** @var ICWP_WPSF_Processor_Plugin $oP */
125
+ $oP = $oMod->getProcessor();
126
  $bSuccess = $oP->getSubProcessorNotes()
127
  ->getQueryCreator()
128
  ->create( $sNote ) !== false;
138
  /**
139
  * @return array
140
  */
141
+ protected function ajaxExec_AdminNotesDelete() {
142
  $oDP = $this->loadDP();
143
  /** @var ICWP_WPSF_FeatureHandler_Plugin $oMod */
144
  $oMod = $this->getConn()->getModule( 'plugin' );
145
+ /** @var ICWP_WPSF_Processor_Plugin $oP */
146
+ $oP = $oMod->getProcessor();
147
+
148
+ $nNoteId = (int)trim( $oDP->post( 'note_id', 0 ) );
149
+ if ( $nNoteId >= 0 ) {
150
+ $oP->getSubProcessorNotes()
151
+ ->getQueryDeleter()
152
+ ->delete( $nNoteId );
153
+ }
154
+
155
+ return array(
156
+ 'success' => true
157
+ );
158
+ }
159
 
160
+ /**
161
+ * @return array
162
+ */
163
+ protected function ajaxExec_AdminNotesRender() {
164
  $aNotes = $this->getNotes();
165
  $sHtml = $this->renderTemplate(
166
  '/wpadmin_pages/insights/admin_notes_table.twig',
211
  }
212
 
213
  /**
214
+ * @return array[]
215
  */
216
  protected function getNotices() {
217
 
238
  'lockdown' => array(),
239
  ),
240
  $aAll
241
+ ),
242
+ function ( $aSection ) {
243
+ return !empty( $aSection[ 'count' ] );
244
+ }
245
  );
246
  }
247
 
templates/php/snippets/google_recaptcha_js.php CHANGED
@@ -26,12 +26,17 @@
26
  }
27
  );
28
 
29
- jQuery( 'input[type=submit]', form ).on( 'click', function( event ) {
30
- <?php if ( $invis ) : ?>
31
- event.preventDefault();
32
- grecaptcha.execute( recaptchaContainerSpec );
33
- <?php endif;?>
34
- });
 
 
 
 
 
35
  }
36
  };
37
 
26
  }
27
  );
28
 
29
+ <?php if ( $invis ) : ?>
30
+ var aSubmitInputs = document.getElementsByTagName( 'input' );
31
+ for ( var i = 0; i < aSubmitInputs.length; i++ ) {
32
+ if ( aSubmitInputs[ i ].type.toLowerCase() === 'submit' ) {
33
+ aSubmitInputs[ i ].onclick = function ( event ) {
34
+ event.preventDefault();
35
+ grecaptcha.execute( recaptchaContainerSpec );
36
+ };
37
+ }
38
+ }
39
+ <?php endif;?>
40
  }
41
  };
42
 
templates/twig/wpadmin_pages/insights/admin_notes_table.twig CHANGED
@@ -1,18 +1,25 @@
1
  {% if flags.has_notes %}
2
- <table class="table table-hover mb-0">
3
  <thead><tr>
4
  <th>Note</th>
5
  <th>User</th>
6
  <th>Date</th>
 
7
  </tr></thead>
8
  {% for note in vars.insight_notes %}
9
  <tr class="message_row">
10
  <td>{{ note.note }}</td>
11
  <td>{{ note.wp_username }}</td>
12
  <td>{{ note.created_at }}</td>
 
 
 
 
 
13
  </tr>
14
  {% endfor %}
15
  </table>
16
  {% else %}
17
  <div class="alert alert-info">There are no admin notes.</div>
18
- {% endif %}
 
1
  {% if flags.has_notes %}
2
+ <table class="table table-hover table-responsive-sm mb-0">
3
  <thead><tr>
4
  <th>Note</th>
5
  <th>User</th>
6
  <th>Date</th>
7
+ <th>&nbsp;</th>
8
  </tr></thead>
9
  {% for note in vars.insight_notes %}
10
  <tr class="message_row">
11
  <td>{{ note.note }}</td>
12
  <td>{{ note.wp_username }}</td>
13
  <td>{{ note.created_at }}</td>
14
+ <td class="cell_delete_note">
15
+ <button class="btn btn-sm btn-outline-danger note_delete"
16
+ data-note_id="{{ note.id }}"
17
+ data-title="Immediately Delete Note">x</button>
18
+ </td>
19
  </tr>
20
  {% endfor %}
21
  </table>
22
  {% else %}
23
  <div class="alert alert-info">There are no admin notes.</div>
24
+ {% endif %}
25
+
templates/twig/wpadmin_pages/insights/index.twig CHANGED
@@ -73,17 +73,21 @@
73
  }
74
  .message_row th,
75
  .message_row td {
76
- padding-bottom: 5px;
77
  border-top: 1px solid #e9edf1; /** make bootstrap border lighter */
78
  }
 
 
 
79
  .icon-sign {
80
  font-size: 14px;
81
  }
82
-
83
  #NewAdminNote textarea {
84
  height: 64px;
85
  }
86
-
 
 
 
87
  #SectionAuditTrail table {
88
  font-size: 12px;
89
  }
@@ -182,4 +186,17 @@
182
  content: "\f525";
183
  }
184
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  {% endblock %}
73
  }
74
  .message_row th,
75
  .message_row td {
 
76
  border-top: 1px solid #e9edf1; /** make bootstrap border lighter */
77
  }
78
+ td.cell_delete_note {
79
+ max-width: 20px;
80
+ }
81
  .icon-sign {
82
  font-size: 14px;
83
  }
 
84
  #NewAdminNote textarea {
85
  height: 64px;
86
  }
87
+ .btn.note_delete {
88
+ padding: 0.1rem 0.3rem 0.3rem;
89
+ line-height: 9px;
90
+ }
91
  #SectionAuditTrail table {
92
  font-size: 12px;
93
  }
186
  content: "\f525";
187
  }
188
  </style>
189
+
190
+
191
+ <script type="text/javascript">
192
+ jQuery( document ).ready( function () {
193
+ jQuery( '.stat.card' ).tooltip( {
194
+ placement: 'bottom',
195
+ trigger: 'hover'
196
+ } );
197
+ } );
198
+ </script>
199
+
200
+
201
+
202
  {% endblock %}
templates/twig/wpadmin_pages/insights/notices.twig CHANGED
@@ -15,7 +15,12 @@
15
  {% for notice_section in vars.insight_notices %}
16
  {% if notice_section.count > 0 %}
17
  <tr class="title_row">
18
- <th colspan="4"><h6 class="m-1">{{ notice_section.title }}</h6></th>
 
 
 
 
 
19
  </tr>
20
 
21
  {% for notice in notice_section.messages %}
15
  {% for notice_section in vars.insight_notices %}
16
  {% if notice_section.count > 0 %}
17
  <tr class="title_row">
18
+ <th colspan="4">
19
+ <h6 class="m-1">
20
+ {{ notice_section.title }}
21
+ <span class="text-muted" style="font-size: smaller;">({{ notice_section.count }})</span>
22
+ </h6>
23
+ </th>
24
  </tr>
25
 
26
  {% for notice in notice_section.messages %}
templates/twig/wpadmin_pages/insights/stats.twig CHANGED
@@ -17,13 +17,4 @@
17
  {% endfor %}
18
  </div>
19
 
20
- <script type="text/javascript">
21
- jQuery( document ).ready( function () {
22
- jQuery( '.stat.card' ).tooltip( {
23
- placement: 'bottom',
24
- trigger: 'hover'
25
- } );
26
- } );
27
- </script>
28
-
29
 
17
  {% endfor %}
18
  </div>
19
 
 
 
 
 
 
 
 
 
 
20