MalCare WordPress Security Plugin – Malware Scanner, Cleaner, Security Firewall - Version 4.56

Version Description

  • Handling Activity Log corner case error
Download this release

Release Info

Developer ritesh.soni36
Plugin Icon 128x128 MalCare WordPress Security Plugin – Malware Scanner, Cleaner, Security Firewall
Version 4.56
Comparing to
See all releases

Code changes from version 4.55 to 4.56

Files changed (5) hide show
  1. callback/wings/watch.php +38 -24
  2. info.php +1 -1
  3. malcare.php +1 -1
  4. readme.txt +4 -1
  5. wp_actlog.php +4 -0
callback/wings/watch.php CHANGED
@@ -91,11 +91,15 @@ class BVWatchCallback extends BVCallbackBase {
91
  if (array_key_exists('lp', $params)) {
92
  require_once dirname( __FILE__ ) . '/../../protect/wp/lp/config.php';
93
  $lp_params = $params['lp'];
94
- $limit = intval(urldecode($lp_params['limit']));
95
- $filter = urldecode($lp_params['filter']);
96
- $db->deleteBVTableContent(BVWPLPConfig::$requests_table, $lp_params['rmfilter']);
97
- $table = $db->getBVTable(BVWPLPConfig::$requests_table);
98
- $resp["lplogs"] = $this->getData($table, $limit, $filter);
 
 
 
 
99
  }
100
 
101
  if (array_key_exists('prelog', $params)) {
@@ -106,37 +110,47 @@ class BVWatchCallback extends BVCallbackBase {
106
  if (array_key_exists('fw', $params)) {
107
  require_once dirname( __FILE__ ) . '/../../protect/fw/config.php';
108
  $fw_params = $params['fw'];
109
- $limit = intval(urldecode($fw_params['limit']));
110
- $filter = urldecode($fw_params['filter']);
111
- $db->deleteBVTableContent(BVFWConfig::$requests_table, $fw_params['rmfilter']);
112
- $table = $db->getBVTable(BVFWConfig::$requests_table);
113
- $resp["fwlogs"] = $this->getData($table, $limit, $filter);
 
 
 
 
114
  }
115
 
116
  if (array_key_exists('dynevent', $params)) {
117
  require_once dirname( __FILE__ ) . '/../../wp_dynsync.php';
118
  $isdynsyncactive = $settings->getOption('bvDynSyncActive');
119
  if ($isdynsyncactive == 'yes') {
120
- $limit = intval(urldecode($params['limit']));
121
- $filter = urldecode($params['filter']);
122
- $this->deleteBvDynamicEvents($params['rmfilter']);
123
- $table = $db->getBVTable(BVWPDynSync::$dynsync_table);
124
- $data = $this->getData($table, $limit, $filter);
125
- $resp['last_id'] = $data['last_id'];
126
- $resp['events'] = $data['rows'];
127
- $resp['timestamp'] = time();
128
- $resp["status"] = true;
 
 
129
  }
130
  }
131
 
132
  if (array_key_exists('actlog', $params)) {
133
  require_once dirname( __FILE__ ) . '/../../wp_actlog.php';
134
  $actlog_params = $params['actlog'];
135
- $limit = intval(urldecode($actlog_params['limit']));
136
- $filter = urldecode($actlog_params['filter']);
137
- $db->deleteBVTableContent(BVWPActLog::$actlog_table, $actlog_params['rmfilter']);
138
- $table = $db->getBVTable(BVWPActLog::$actlog_table);
139
- $resp["actlogs"] = $this->getData($table, $limit, $filter);
 
 
 
 
140
  }
141
 
142
  $resp["status"] = "done";
91
  if (array_key_exists('lp', $params)) {
92
  require_once dirname( __FILE__ ) . '/../../protect/wp/lp/config.php';
93
  $lp_params = $params['lp'];
94
+ if (!$lp_params['check_table'] || $db->isTablePresent(BVWPLPConfig::$requests_table)) {
95
+ $limit = intval(urldecode($lp_params['limit']));
96
+ $filter = urldecode($lp_params['filter']);
97
+ $db->deleteBVTableContent(BVWPLPConfig::$requests_table, $lp_params['rmfilter']);
98
+ $table = $db->getBVTable(BVWPLPConfig::$requests_table);
99
+ $resp["lplogs"] = $this->getData($table, $limit, $filter);
100
+ } else {
101
+ $resp["lplogs"] = array("status" => "TABLE_NOT_PRESENT");
102
+ }
103
  }
104
 
105
  if (array_key_exists('prelog', $params)) {
110
  if (array_key_exists('fw', $params)) {
111
  require_once dirname( __FILE__ ) . '/../../protect/fw/config.php';
112
  $fw_params = $params['fw'];
113
+ if (!$fw_params['check_table'] || $db->isTablePresent(BVFWConfig::$requests_table)) {
114
+ $limit = intval(urldecode($fw_params['limit']));
115
+ $filter = urldecode($fw_params['filter']);
116
+ $db->deleteBVTableContent(BVFWConfig::$requests_table, $fw_params['rmfilter']);
117
+ $table = $db->getBVTable(BVFWConfig::$requests_table);
118
+ $resp["fwlogs"] = $this->getData($table, $limit, $filter);
119
+ } else {
120
+ $resp["fwlogs"] = array("status" => "TABLE_NOT_PRESENT");
121
+ }
122
  }
123
 
124
  if (array_key_exists('dynevent', $params)) {
125
  require_once dirname( __FILE__ ) . '/../../wp_dynsync.php';
126
  $isdynsyncactive = $settings->getOption('bvDynSyncActive');
127
  if ($isdynsyncactive == 'yes') {
128
+ if (!$params['check_table'] || $db->isTablePresent(BVWPDynSync::$dynsync_table)) {
129
+ $limit = intval(urldecode($params['limit']));
130
+ $filter = urldecode($params['filter']);
131
+ $this->deleteBvDynamicEvents($params['rmfilter']);
132
+ $table = $db->getBVTable(BVWPDynSync::$dynsync_table);
133
+ $data = $this->getData($table, $limit, $filter);
134
+ $resp['last_id'] = $data['last_id'];
135
+ $resp['events'] = $data['rows'];
136
+ $resp['timestamp'] = time();
137
+ $resp["status"] = true;
138
+ }
139
  }
140
  }
141
 
142
  if (array_key_exists('actlog', $params)) {
143
  require_once dirname( __FILE__ ) . '/../../wp_actlog.php';
144
  $actlog_params = $params['actlog'];
145
+ if (!$actlog_params['check_table'] || $db->isTablePresent(BVWPActLog::$actlog_table)) {
146
+ $limit = intval(urldecode($actlog_params['limit']));
147
+ $filter = urldecode($actlog_params['filter']);
148
+ $db->deleteBVTableContent(BVWPActLog::$actlog_table, $actlog_params['rmfilter']);
149
+ $table = $db->getBVTable(BVWPActLog::$actlog_table);
150
+ $resp["actlogs"] = $this->getData($table, $limit, $filter);
151
+ } else {
152
+ $resp["actlogs"] = array("status" => "TABLE_NOT_PRESENT");
153
+ }
154
  }
155
 
156
  $resp["status"] = "done";
info.php CHANGED
@@ -10,7 +10,7 @@ if (!class_exists('MCInfo')) :
10
  public $badgeinfo = 'mcbadge';
11
  public $ip_header_option = 'mcipheader';
12
  public $brand_option = 'mcbrand';
13
- public $version = '4.55';
14
  public $webpage = 'https://www.malcare.com';
15
  public $appurl = 'https://app.malcare.com';
16
  public $slug = 'malcare-security/malcare.php';
10
  public $badgeinfo = 'mcbadge';
11
  public $ip_header_option = 'mcipheader';
12
  public $brand_option = 'mcbrand';
13
+ public $version = '4.56';
14
  public $webpage = 'https://www.malcare.com';
15
  public $appurl = 'https://app.malcare.com';
16
  public $slug = 'malcare-security/malcare.php';
malcare.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.malcare.com
5
  Description: MalCare Security - Free Malware Scanner, Protection & Security for WordPress
6
  Author: MalCare Security
7
  Author URI: https://www.malcare.com
8
- Version: 4.55
9
  Network: True
10
  */
11
 
5
  Description: MalCare Security - Free Malware Scanner, Protection & Security for WordPress
6
  Author: MalCare Security
7
  Author URI: https://www.malcare.com
8
+ Version: 4.56
9
  Network: True
10
  */
11
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://www.malcare.com
6
  Requires at least: 4.0
7
  Tested up to: 5.7
8
  Requires PHP: 5.4.0
9
- Stable tag: 4.55
10
  License: GPLv2 or later
11
  License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
12
 
@@ -397,6 +397,9 @@ These are available on our website: [Terms of Service](https://www.malcare.com/t
397
  8. MalCare’s Uptime Monitoring notifies if a website goes down so that you can handle the situation before starting to lose visitors.
398
 
399
  == CHANGELOG ==
 
 
 
400
  = 4.55 =
401
  * Activity Log for Woocommerce events
402
  * Minor Improvements in Firewall
6
  Requires at least: 4.0
7
  Tested up to: 5.7
8
  Requires PHP: 5.4.0
9
+ Stable tag: 4.56
10
  License: GPLv2 or later
11
  License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
12
 
397
  8. MalCare’s Uptime Monitoring notifies if a website goes down so that you can handle the situation before starting to lose visitors.
398
 
399
  == CHANGELOG ==
400
+ = 4.56 =
401
+ * Handling Activity Log corner case error
402
+
403
  = 4.55 =
404
  * Activity Log for Woocommerce events
405
  * Minor Improvements in Firewall
wp_actlog.php CHANGED
@@ -125,6 +125,10 @@ if (!class_exists('BVWPActLog')) :
125
  }
126
 
127
  function add_activity($event_data) {
 
 
 
 
128
  $user = wp_get_current_user();
129
  $values = array();
130
  if (!empty($user)) {
125
  }
126
 
127
  function add_activity($event_data) {
128
+ if (!function_exists('wp_get_current_user')) {
129
+ @include_once(ABSPATH . "wp-includes/pluggable.php");
130
+ }
131
+
132
  $user = wp_get_current_user();
133
  $values = array();
134
  if (!empty($user)) {