Wordfence Security – Firewall & Malware Scan - Version 1.3.3

Version Description

  • Made real-time server polling more efficient.
  • Entering your API key now automatically starts your first scan. Was causing some confusion.
  • Link to forums added for free customer support.
Download this release

Release Info

Developer mmaunder
Plugin Icon 128x128 Wordfence Security – Firewall & Malware Scan
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.3

Files changed (5) hide show
  1. js/admin.js +14 -11
  2. lib/menu_scan.php +6 -3
  3. lib/wordfenceClass.php +1 -0
  4. readme.txt +6 -1
  5. wordfence.php +1 -1
js/admin.js CHANGED
@@ -27,26 +27,30 @@ window['wordfenceAdmin'] = {
27
} else if(jQuery('#wordfenceMode_activity').length > 0){
28
this.mode = 'activity';
29
this.activityMode = 'hit';
30
- this.updateTicker();
31
} else if(jQuery('#wordfenceMode_options').length > 0){
32
this.mode = 'options';
33
jQuery('.wfConfigElem').change(function(){ jQuery('#securityLevel').val('CUSTOM'); });
34
- this.updateTicker();
35
} else if(jQuery('#wordfenceMode_blockedIPs').length > 0){
36
this.mode = 'blocked';
37
this.staticTabChanged();
38
- this.updateTicker();
39
} else {
40
this.mode = false;
41
}
42
if(this.mode){ //We are in a Wordfence page
43
var self = this;
44
- this.liveInt = setInterval(function(){ self.updateTicker(); }, 1000);
45
jQuery(document).bind('cbox_closed', function(){ self.colorboxIsOpen = false; self.colorboxServiceQueue(); });
46
}
47
48
},
49
- updateTicker: function(){
50
var self = this;
51
var alsoGet = '';
52
var otherParams = '';
@@ -57,11 +61,10 @@ window['wordfenceAdmin'] = {
57
this.ajax('wordfence_ticker', {
58
alsoGet: alsoGet,
59
otherParams: otherParams
60
- }, function(res){
61
- self.handleTickerReturn(res);
62
- });
63
},
64
handleTickerReturn: function(res){
65
var statusMsgChanged = false;
66
var newMsg = "";
67
var oldMsg = jQuery('#wfLiveStatus').html();
@@ -100,7 +103,7 @@ window['wordfenceAdmin'] = {
100
} else if(this.mode == 'activity'){
101
if(res.alsoGet != 'logList_' + this.activityMode){ return; } //user switched panels since ajax request started
102
if(/^(?:topScanners|topLeechers)#x2F;.test(this.activityMode)){
103
- if(statusMsgChanged){ this.updateTicker(); } return;
104
}
105
if(res.events.length > 0){
106
this.newestActivityTime = res.events[0]['ctime'];
@@ -138,7 +141,7 @@ window['wordfenceAdmin'] = {
138
jQuery(elem).html(self.makeTimeAgo(res.serverTime - jQuery(elem).data('wfctime')) + ' ago');
139
});
140
}
141
- if(statusMsgChanged){ this.updateTicker(); } return;
142
},
143
reverseLookupIPs: function(){
144
var ips = [];
@@ -498,7 +501,7 @@ window['wordfenceAdmin'] = {
498
reloadActivities: function(){
499
jQuery('#wfActivity_' + this.activityMode).html('<div class="wfLoadingWhite32"></div>');
500
this.newestActivityTime = 0;
501
- this.updateTicker();
502
},
503
staticTabChanged: function(){
504
var mode = jQuery('.wfDataPanel:visible')[0].id.replace('wfActivity_','');
27
} else if(jQuery('#wordfenceMode_activity').length > 0){
28
this.mode = 'activity';
29
this.activityMode = 'hit';
30
+ this.updateTicker(true);
31
} else if(jQuery('#wordfenceMode_options').length > 0){
32
this.mode = 'options';
33
jQuery('.wfConfigElem').change(function(){ jQuery('#securityLevel').val('CUSTOM'); });
34
+ this.updateTicker(true);
35
} else if(jQuery('#wordfenceMode_blockedIPs').length > 0){
36
this.mode = 'blocked';
37
this.staticTabChanged();
38
+ this.updateTicker(true);
39
} else {
40
this.mode = false;
41
}
42
if(this.mode){ //We are in a Wordfence page
43
var self = this;
44
+ this.liveInt = setInterval(function(){ self.updateTicker(); }, 2000);
45
jQuery(document).bind('cbox_closed', function(){ self.colorboxIsOpen = false; self.colorboxServiceQueue(); });
46
}
47
48
},
49
+ updateTicker: function(forceUpdate){
50
+ if( (! forceUpdate) && this.tickerUpdatePending){
51
+ return;
52
+ }
53
+ this.tickerUpdatePending = true;
54
var self = this;
55
var alsoGet = '';
56
var otherParams = '';
61
this.ajax('wordfence_ticker', {
62
alsoGet: alsoGet,
63
otherParams: otherParams
64
+ }, function(res){ self.handleTickerReturn(res); }, function(){ self.tickerUpdatePending = false; });
65
},
66
handleTickerReturn: function(res){
67
+ this.tickerUpdatePending = false;
68
var statusMsgChanged = false;
69
var newMsg = "";
70
var oldMsg = jQuery('#wfLiveStatus').html();
103
} else if(this.mode == 'activity'){
104
if(res.alsoGet != 'logList_' + this.activityMode){ return; } //user switched panels since ajax request started
105
if(/^(?:topScanners|topLeechers)#x2F;.test(this.activityMode)){
106
+ if(statusMsgChanged){ this.updateTicker(true); } return;
107
}
108
if(res.events.length > 0){
109
this.newestActivityTime = res.events[0]['ctime'];
141
jQuery(elem).html(self.makeTimeAgo(res.serverTime - jQuery(elem).data('wfctime')) + ' ago');
142
});
143
}
144
+ if(statusMsgChanged){ this.updateTicker(true); } return;
145
},
146
reverseLookupIPs: function(){
147
var ips = [];
501
reloadActivities: function(){
502
jQuery('#wfActivity_' + this.activityMode).html('<div class="wfLoadingWhite32"></div>');
503
this.newestActivityTime = 0;
504
+ this.updateTicker(true);
505
},
506
staticTabChanged: function(){
507
var mode = jQuery('.wfDataPanel:visible')[0].id.replace('wfActivity_','');
lib/menu_scan.php CHANGED
@@ -382,12 +382,14 @@
382
<script type="text/x-jquery-template" id="wfNoScanYetTmpl">
383
<div>
384
<table class="wfSummaryParent" cellpadding="0" cellspacing="0">
385
- <tr><th class="wfHead">Please start your first scan</th></tr>
386
<tr><td>
387
<table class="wfSC1" cellpadding="0" cellspacing="0">
388
<tr><td>
389
- You have not completed your first Wordfence scan yet.
390
- Please click the button below to start your first scan.
391
</td></tr>
392
<tr><td>
393
<div class="wordfenceScanButton"><input type="button" value="Start a Wordfence Scan" class="wfStartScanButton button-primary" /></div>
@@ -438,6 +440,7 @@
438
</td></tr>
439
<tr><td>
440
<div class="wordfenceScanButton"><input type="button" value="Start a Wordfence Scan" class="wfStartScanButton button-primary" /></div>
441
</td></tr>
442
</table>
443
</td>
382
<script type="text/x-jquery-template" id="wfNoScanYetTmpl">
383
<div>
384
<table class="wfSummaryParent" cellpadding="0" cellspacing="0">
385
+ <tr><th class="wfHead">Your first scan is starting now</th></tr>
386
<tr><td>
387
<table class="wfSC1" cellpadding="0" cellspacing="0">
388
<tr><td>
389
+ Your first Wordfence scan should be automatically starting now
390
+ and you will see the scan details in the "Activity Log" above in a few seconds.
391
+ While you're waiting, why not visit the <a href="http://www.wordfence.com/forums/" target="_blank">Wordfence Forums</a>
392
+ where you can post your comments or questions. We would love to hear from you.
393
</td></tr>
394
<tr><td>
395
<div class="wordfenceScanButton"><input type="button" value="Start a Wordfence Scan" class="wfStartScanButton button-primary" /></div>
440
</td></tr>
441
<tr><td>
442
<div class="wordfenceScanButton"><input type="button" value="Start a Wordfence Scan" class="wfStartScanButton button-primary" /></div>
443
+ <a href="http://www.wordfence.com/forums/" target="_blank">Visit the Wordfence forums for help.</a>
444
</td></tr>
445
</table>
446
</td>
lib/wordfenceClass.php CHANGED
@@ -668,6 +668,7 @@ class wordfence {
668
}
669
if($result['ok'] && $result['isPaid']){
670
wfConfig::set('isPaid', $result['isPaid']);
671
return array("ok" => 1);
672
} else {
673
return array('errorAlert' => "An unknown error occured trying to activate Wordfence. Please try again in a few minutes." );
668
}
669
if($result['ok'] && $result['isPaid']){
670
wfConfig::set('isPaid', $result['isPaid']);
671
+ self::startScan();
672
return array("ok" => 1);
673
} else {
674
return array('errorAlert' => "An unknown error occured trying to activate Wordfence. Please try again in a few minutes." );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mmaunder
3
Tags: anti-virus, malware, firewall, antivirus, virus, google safe browsing, phishing, scrapers, hacking, wordfence
4
Requires at least: 3.3.1
5
Tested up to: 3.3.2
6
- Stable tag: 1.3.2
7
8
Wordfence is an enterprise firewall and anti-virus plugin for WordPress.
9
@@ -89,6 +89,11 @@ Yes! Simply visit the Options page, click on advanced options and enable or disa
89
5. If you're technically minded, this is the under-the-hood view of Wordfence options where you can fine-tune your security settings.
90
91
== Changelog ==
92
= 1.3.2 =
93
* Reduced the number of database connections that Wordfence makes to one.
94
* Modified the memory efficient unbuffered queries we use to only use a single DB connection.
3
Tags: anti-virus, malware, firewall, antivirus, virus, google safe browsing, phishing, scrapers, hacking, wordfence
4
Requires at least: 3.3.1
5
Tested up to: 3.3.2
6
+ Stable tag: 1.3.3
7
8
Wordfence is an enterprise firewall and anti-virus plugin for WordPress.
9
89
5. If you're technically minded, this is the under-the-hood view of Wordfence options where you can fine-tune your security settings.
90
91
== Changelog ==
92
+ = 1.3.3 =
93
+ * Made real-time server polling more efficient.
94
+ * Entering your API key now automatically starts your first scan. Was causing some confusion.
95
+ * Link to forums added for free customer support.
96
+
97
= 1.3.2 =
98
* Reduced the number of database connections that Wordfence makes to one.
99
* Modified the memory efficient unbuffered queries we use to only use a single DB connection.
wordfence.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Wordfence
4
Plugin URI: http://wordfence.com/
5
Description: Anti-virus and Firewall for WordPress
6
Author: Mark Maunder
7
- Version: 1.3.2
8
Author URI: http://wordfence.com/
9
*/
10
require_once('lib/wordfenceConstants.php');
4
Plugin URI: http://wordfence.com/
5
Description: Anti-virus and Firewall for WordPress
6
Author: Mark Maunder
7
+ Version: 1.3.3
8
Author URI: http://wordfence.com/
9
*/
10
require_once('lib/wordfenceConstants.php');