Wordfence Security – Firewall & Malware Scan - Version 6.3.22

Version Description

  • Fix: Addressed a warning that could occur on PHP 7.1 when reading php.ini size values.
  • Fix: Fixed a warning by adjusting a query to remove old-style variable references.
Download this release

Release Info

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

Code changes from version 6.3.21 to 6.3.22

lib/wfCrawl.php CHANGED
@@ -175,16 +175,10 @@ class wfCrawl {
175
  ));
176
  if (is_array($data) && !empty($data['verified'])) {
177
  // Cache results
178
- $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate)
179
- values (%s, UNHEX(MD5('%s')), '%s', unix_timestamp())
180
- ON DUPLICATE KEY UPDATE status='%3\$s', lastUpdate=unix_timestamp()",
181
- $IPn, $patternSig, 'verified');
182
  return self::GOOGLE_BOT_VERIFIED;
183
  } else {
184
- $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate)
185
- values (%s, UNHEX(MD5('%s')), '%s', unix_timestamp())
186
- ON DUPLICATE KEY UPDATE status='%3\$s', lastUpdate=unix_timestamp()",
187
- $IPn, $patternSig, 'fakeBot');
188
  self::GOOGLE_BOT_FAKE;
189
  }
190
  } catch (Exception $e) {
175
  ));
176
  if (is_array($data) && !empty($data['verified'])) {
177
  // Cache results
178
+ $db->queryWrite("INSERT INTO {$table} (IP, patternSig, status, lastUpdate) VALUES ('%s', UNHEX(MD5('%s')), '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE status = VALUES(status), lastUpdate = VALUES(lastUpdate)", $IPn, $patternSig, 'verified');
 
 
 
179
  return self::GOOGLE_BOT_VERIFIED;
180
  } else {
181
+ $db->queryWrite("INSERT INTO {$table} (IP, patternSig, status, lastUpdate) VALUES ('%s', UNHEX(MD5('%s')), '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE status = VALUES(status), lastUpdate = VALUES(lastUpdate)", $IPn, $patternSig, 'fakeBot');
 
 
 
182
  self::GOOGLE_BOT_FAKE;
183
  }
184
  } catch (Exception $e) {
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: mmaunder
3
  Tags: security, firewall, login security, limit login attempts, malware scanner, antivirus, web application firewall, block hackers, country blocking, clean hacked site, blacklist, waf
4
  Requires at least: 3.9
5
- Tested up to: 4.8.3
6
- Stable tag: 6.3.21
7
 
8
  Secure your website with the most comprehensive WordPress security plugin. Firewall, malware scan, blocking, live traffic, login security & more.
9
 
@@ -150,6 +150,10 @@ Secure your website with Wordfence.
150
 
151
  == Changelog ==
152
 
 
 
 
 
153
  = 6.3.21 =
154
  * Improvement: Updated bundled GeoIP database.
155
  * Fix: Fixed a log warning that could occur during the scan for plugins not in the wordpress.org repository.
2
  Contributors: mmaunder
3
  Tags: security, firewall, login security, limit login attempts, malware scanner, antivirus, web application firewall, block hackers, country blocking, clean hacked site, blacklist, waf
4
  Requires at least: 3.9
5
+ Tested up to: 4.9.1
6
+ Stable tag: 6.3.22
7
 
8
  Secure your website with the most comprehensive WordPress security plugin. Firewall, malware scan, blocking, live traffic, login security & more.
9
 
150
 
151
  == Changelog ==
152
 
153
+ = 6.3.22 =
154
+ * Fix: Addressed a warning that could occur on PHP 7.1 when reading php.ini size values.
155
+ * Fix: Fixed a warning by adjusting a query to remove old-style variable references.
156
+
157
  = 6.3.21 =
158
  * Improvement: Updated bundled GeoIP database.
159
  * Fix: Fixed a log warning that could occur during the scan for plugins not in the wordpress.org repository.
vendor/wordfence/wf-waf/src/lib/utils.php CHANGED
@@ -534,7 +534,12 @@ class wfWAFUtils {
534
  */
535
  public static function iniSizeToBytes($val) {
536
  $val = trim($val);
 
 
 
 
537
  $last = strtolower(substr($val, -1));
 
538
  switch ($last) {
539
  case 'g':
540
  $val *= 1024;
@@ -544,7 +549,7 @@ class wfWAFUtils {
544
  $val *= 1024;
545
  }
546
 
547
- return intval($val);
548
  }
549
 
550
  public static function reverseLookup($IP) {
534
  */
535
  public static function iniSizeToBytes($val) {
536
  $val = trim($val);
537
+ if (preg_match('/^\d+$/', $val)) {
538
+ return (int) $val;
539
+ }
540
+
541
  $last = strtolower(substr($val, -1));
542
+ $val = (int) substr($val, 0, -1);
543
  switch ($last) {
544
  case 'g':
545
  $val *= 1024;
549
  $val *= 1024;
550
  }
551
 
552
+ return $val;
553
  }
554
 
555
  public static function reverseLookup($IP) {
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.3.21
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.3.21');
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.3.22
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.3.22');
15
  define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
16
  basename(dirname(__FILE__)) . '/' . basename(__FILE__));
17