Wordfence Security – Firewall & Malware Scan - Version 6.2.2

Version Description

  • Fix: Replaced a slow query in the dashboard widget that could affect sites with very large numbers of users.
Download this release

Release Info

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

Code changes from version 6.2.1 to 6.2.2

Files changed (3) hide show
  1. lib/wfActivityReport.php +12 -5
  2. readme.txt +4 -1
  3. wordfence.php +2 -2
lib/wfActivityReport.php CHANGED
@@ -255,12 +255,10 @@ SQL
255
  break;
256
  }
257
 
258
- $results = $this->db->get_results($this->db->prepare(<<<SQL
259
  SELECT wfl.*,
260
- sum(wfl.fail) as fail_count,
261
- !ISNULL(wpu.ID) as is_valid_user
262
  FROM {$this->db->base_prefix}wfLogins wfl
263
- LEFT JOIN {$this->db->base_prefix}users wpu ON wfl.username = wpu.user_login OR wfl.username = wpu.user_email
264
  WHERE wfl.fail = 1
265
  AND wfl.ctime > $interval
266
  GROUP BY wfl.username
@@ -268,7 +266,16 @@ ORDER BY fail_count DESC
268
  LIMIT %d
269
  SQL
270
  , $limit));
271
- return $results;
 
 
 
 
 
 
 
 
 
272
  }
273
 
274
  /**
255
  break;
256
  }
257
 
258
+ $failedLogins = $this->db->get_results($this->db->prepare(<<<SQL
259
  SELECT wfl.*,
260
+ sum(wfl.fail) as fail_count
 
261
  FROM {$this->db->base_prefix}wfLogins wfl
 
262
  WHERE wfl.fail = 1
263
  AND wfl.ctime > $interval
264
  GROUP BY wfl.username
266
  LIMIT %d
267
  SQL
268
  , $limit));
269
+
270
+ foreach ($failedLogins as &$login) {
271
+ $exists = $this->db->get_var($this->db->prepare(<<<SQL
272
+ SELECT !ISNULL(ID) FROM {$this->db->base_prefix}users WHERE user_login = '%s' OR user_email = '%s'
273
+ SQL
274
+ , $login->username, $login->username));
275
+ $login->is_valid_user = $exists;
276
+ }
277
+
278
+ return $failedLogins;
279
  }
280
 
281
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mmaunder
3
  Tags: security, secure, security plugin, wordpress security, login security, firewall, malware, antivirus, web application firewall, block hackers, country blocking
4
  Requires at least: 3.9
5
  Tested up to: 4.6.1
6
- Stable tag: 6.2.1
7
 
8
  Secure your website with the most comprehensive WordPress security plugin. Firewall, malware scan, blocking, live traffic, login security & more.
9
 
@@ -190,6 +190,9 @@ Secure your website with Wordfence.
190
 
191
  == Changelog ==
192
 
 
 
 
193
  = 6.2.1 =
194
  * Improvement: Now performing scanning for PHP code in all uploaded files in real-time.
195
  * Improvement: Improved handling of bad characters and IPv6 ranges in Advanced Blocking.
3
  Tags: security, secure, security plugin, wordpress security, login security, firewall, malware, antivirus, web application firewall, block hackers, country blocking
4
  Requires at least: 3.9
5
  Tested up to: 4.6.1
6
+ Stable tag: 6.2.2
7
 
8
  Secure your website with the most comprehensive WordPress security plugin. Firewall, malware scan, blocking, live traffic, login security & more.
9
 
190
 
191
  == Changelog ==
192
 
193
+ = 6.2.2 =
194
+ * Fix: Replaced a slow query in the dashboard widget that could affect sites with very large numbers of users.
195
+
196
  = 6.2.1 =
197
  * Improvement: Now performing scanning for PHP code in all uploaded files in real-time.
198
  * Improvement: Improved handling of bad characters and IPv6 ranges in Advanced Blocking.
wordfence.php CHANGED
@@ -4,14 +4,14 @@ Plugin Name: Wordfence Security
4
  Plugin URI: http://www.wordfence.com/
5
  Description: Wordfence Security - Anti-virus, Firewall and Malware Scan
6
  Author: Wordfence
7
- Version: 6.2.1
8
  Author URI: http://www.wordfence.com/
9
  Network: true
10
  */
11
  if(defined('WP_INSTALLING') && WP_INSTALLING){
12
  return;
13
  }
14
- define('WORDFENCE_VERSION', '6.2.1');
15
  define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
16
  basename(dirname(__FILE__)) . '/' . basename(__FILE__));
17
 
4
  Plugin URI: http://www.wordfence.com/
5
  Description: Wordfence Security - Anti-virus, Firewall and Malware Scan
6
  Author: Wordfence
7
+ Version: 6.2.2
8
  Author URI: http://www.wordfence.com/
9
  Network: true
10
  */
11
  if(defined('WP_INSTALLING') && WP_INSTALLING){
12
  return;
13
  }
14
+ define('WORDFENCE_VERSION', '6.2.2');
15
  define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
16
  basename(dirname(__FILE__)) . '/' . basename(__FILE__));
17