Wordfence Security – Firewall & Malware Scan - Version 2.0.2

Version Description

  • Fixed plugin upgrades so that css and scripts are not cached across versions.
Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.2

Files changed (4) hide show
  1. lib/wfUtils.php +15 -9
  2. lib/wordfenceClass.php +7 -7
  3. readme.txt +4 -1
  4. wordfence.php +1 -1
lib/wfUtils.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  class wfUtils {
3
  private static $reverseLookupCache = array();
 
4
  public static function makeTimeAgo($secs, $noSeconds = false) {
5
  if($secs < 1){
6
  return "a moment";
@@ -153,17 +154,22 @@ class wfUtils {
153
  return rtrim(site_url(), '/') . '/';
154
  }
155
  public static function myVersion(){
156
- if(! function_exists( 'get_plugin_data')){
157
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
158
- }
159
- $file = dirname(__FILE__) . '/../wordfence.php';
160
- if(is_file($file)){
161
- $dat = get_plugin_data($file);
162
- if(is_array($dat)){
163
- return $dat['Version'];
 
 
 
 
 
164
  }
165
  }
166
- return 'unknown';
167
  }
168
  public static function longestLine($data){
169
  $lines = preg_split('/[\r\n]+/', $data);
1
  <?php
2
  class wfUtils {
3
  private static $reverseLookupCache = array();
4
+ private static $myVersion = false;
5
  public static function makeTimeAgo($secs, $noSeconds = false) {
6
  if($secs < 1){
7
  return "a moment";
154
  return rtrim(site_url(), '/') . '/';
155
  }
156
  public static function myVersion(){
157
+ if(! self::$myVersion){
158
+ if(! function_exists( 'get_plugin_data')){
159
+ require_once ABSPATH . '/wp-admin/includes/plugin.php';
160
+ }
161
+ $file = dirname(__FILE__) . '/../wordfence.php';
162
+ if(is_file($file)){
163
+ $dat = get_plugin_data($file);
164
+ if(is_array($dat)){
165
+ self::$myVersion = $dat['Version'];
166
+ }
167
+ }
168
+ if(! self::$myVersion){
169
+ self::$myVersion = 'unknown';
170
  }
171
  }
172
+ return self::$myVersion;
173
  }
174
  public static function longestLine($data){
175
  $lines = preg_split('/[\r\n]+/', $data);
lib/wordfenceClass.php CHANGED
@@ -1067,16 +1067,16 @@ class wordfence {
1067
  foreach(array('activate', 'scan', 'sendActivityLog', 'restoreFile', 'deleteFile', 'removeExclusion', 'activityLogUpdate', 'ticker', 'loadIssues', 'updateIssueStatus', 'deleteIssue', 'updateAllIssues', 'reverseLookup', 'unlockOutIP', 'unblockIP', 'blockIP', 'loadStaticPanel', 'saveConfig', 'clearAllBlocked') as $func){
1068
  add_action('wp_ajax_wordfence_' . $func, 'wordfence::ajaxReceiver');
1069
  }
1070
- wp_enqueue_style('wordfence-main-style', WP_PLUGIN_URL . '/wordfence/css/main.css');
1071
- wp_enqueue_style('wordfence-colorbox-style', WP_PLUGIN_URL . '/wordfence/css/colorbox.css');
1072
- wp_enqueue_style('wordfence-dttable-style', WP_PLUGIN_URL . '/wordfence/css/dt_table.css');
1073
 
1074
  wp_enqueue_script('json2');
1075
- wp_enqueue_script('jquery.tmpl', wfUtils::getBaseURL() . 'js/jquery.tmpl.min.js', array('jquery'));
1076
- wp_enqueue_script('jquery.colorbox', wfUtils::getBaseURL() . 'js/jquery.colorbox-min.js', array('jquery'));
1077
- wp_enqueue_script('jquery.dataTables', wfUtils::getBaseURL() . 'js/jquery.dataTables.min.js', array('jquery'));
1078
  //wp_enqueue_script('jquery.tools', wfUtils::getBaseURL() . 'js/jquery.tools.min.js', array('jquery'));
1079
- wp_enqueue_script('wordfenceAdminjs', wfUtils::getBaseURL() . 'js/admin.js', array('jquery'));
1080
  wp_localize_script('wordfenceAdminjs', 'WordfenceAdminVars', array(
1081
  'ajaxURL' => admin_url('admin-ajax.php'),
1082
  'firstNonce' => wp_create_nonce('wp-ajax'),
1067
  foreach(array('activate', 'scan', 'sendActivityLog', 'restoreFile', 'deleteFile', 'removeExclusion', 'activityLogUpdate', 'ticker', 'loadIssues', 'updateIssueStatus', 'deleteIssue', 'updateAllIssues', 'reverseLookup', 'unlockOutIP', 'unblockIP', 'blockIP', 'loadStaticPanel', 'saveConfig', 'clearAllBlocked') as $func){
1068
  add_action('wp_ajax_wordfence_' . $func, 'wordfence::ajaxReceiver');
1069
  }
1070
+ wp_enqueue_style('wordfence-main-style', WP_PLUGIN_URL . '/wordfence/css/main.css', '', wfUtils::myVersion());
1071
+ wp_enqueue_style('wordfence-colorbox-style', WP_PLUGIN_URL . '/wordfence/css/colorbox.css', '', wfUtils::myVersion());
1072
+ wp_enqueue_style('wordfence-dttable-style', WP_PLUGIN_URL . '/wordfence/css/dt_table.css', '', wfUtils::myVersion());
1073
 
1074
  wp_enqueue_script('json2');
1075
+ wp_enqueue_script('jquery.tmpl', wfUtils::getBaseURL() . 'js/jquery.tmpl.min.js', array('jquery'), wfUtils::myVersion());
1076
+ wp_enqueue_script('jquery.colorbox', wfUtils::getBaseURL() . 'js/jquery.colorbox-min.js', array('jquery'), wfUtils::myVersion());
1077
+ wp_enqueue_script('jquery.dataTables', wfUtils::getBaseURL() . 'js/jquery.dataTables.min.js', array('jquery'), wfUtils::myVersion());
1078
  //wp_enqueue_script('jquery.tools', wfUtils::getBaseURL() . 'js/jquery.tools.min.js', array('jquery'));
1079
+ wp_enqueue_script('wordfenceAdminjs', wfUtils::getBaseURL() . 'js/admin.js', array('jquery'), wfUtils::myVersion());
1080
  wp_localize_script('wordfenceAdminjs', 'WordfenceAdminVars', array(
1081
  'ajaxURL' => admin_url('admin-ajax.php'),
1082
  'firstNonce' => wp_create_nonce('wp-ajax'),
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mmaunder
3
  Tags: wordpress, security, wordpress security, security plugin, secure, anti-virus, malware, firewall, antivirus, virus, google safe browsing, phishing, scrapers, hacking, wordfence, securty, secrity, secure
4
  Requires at least: 3.3.1
5
  Tested up to: 3.3.2
6
- Stable tag: 2.0.1
7
 
8
  Wordfence Security is a free enterprise class security plugin that includes a firewall, virus scanning, real-time traffic with geolocation and more.
9
 
@@ -152,6 +152,9 @@ or a theme, because often these have been updated to fix a security hole.
152
  5. If you're technically minded, this is the under-the-hood view of Wordfence options where you can fine-tune your security settings.
153
 
154
  == Changelog ==
 
 
 
155
  = 2.0.1 =
156
  * Improved scanning for specific attacks being used in the PHP-CGI vulnerability ( CVE-2012-1823)
157
  * API keys no longer required. WF fetches a temporary anonymous API key for you on activation.
3
  Tags: wordpress, security, wordpress security, security plugin, secure, anti-virus, malware, firewall, antivirus, virus, google safe browsing, phishing, scrapers, hacking, wordfence, securty, secrity, secure
4
  Requires at least: 3.3.1
5
  Tested up to: 3.3.2
6
+ Stable tag: 2.0.2
7
 
8
  Wordfence Security is a free enterprise class security plugin that includes a firewall, virus scanning, real-time traffic with geolocation and more.
9
 
152
  5. If you're technically minded, this is the under-the-hood view of Wordfence options where you can fine-tune your security settings.
153
 
154
  == Changelog ==
155
+ = 2.0.2 =
156
+ * Fixed plugin upgrades so that css and scripts are not cached across versions.
157
+
158
  = 2.0.1 =
159
  * Improved scanning for specific attacks being used in the PHP-CGI vulnerability ( CVE-2012-1823)
160
  * API keys no longer required. WF fetches a temporary anonymous API key for you on activation.
wordfence.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Wordfence Security
4
  Plugin URI: http://wordfence.com/
5
  Description: Wordfence Security - Anti-virus and Firewall security plugin for WordPress
6
  Author: Mark Maunder
7
- Version: 2.0.1
8
  Author URI: http://wordfence.com/
9
  */
10
  require_once('lib/wordfenceConstants.php');
4
  Plugin URI: http://wordfence.com/
5
  Description: Wordfence Security - Anti-virus and Firewall security plugin for WordPress
6
  Author: Mark Maunder
7
+ Version: 2.0.2
8
  Author URI: http://wordfence.com/
9
  */
10
  require_once('lib/wordfenceConstants.php');