Skip to content

Commit a3f5966

Browse files
committed
Added: filter plugin version numbers for typos
fix for issue #14
1 parent a9f708d commit a3f5966

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
**MainWP check vulnerability extension**
22

33
**Changelog:**
4+
* 1.4.4 Added: filter plugin version numbers for typos
45
* 1.4.3 Fix double creation of adapted file
56
* Fix: Adapted file creation on scan
67
* 1.4.2 Added animation on action buttons

class/class-dashboard.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
// mwpcpv dashboard
3-
// version: 1.2.2
3+
// version: 1.2.3
44
// ---------------------
55

66
class MainWPCheckPluginVulnerability extends MainWPCheckPluginVulnerabilityActivator {
@@ -281,6 +281,13 @@ public static function hhdev_mwpcpv_render_page() {
281281

282282
// if ($slug == 'wp-mail-logging') echo '<p>vuln version: '.$vuln_version.' -> plugin: '.$plugin['version'].'-> '.$plugin_data['title'].'</p>';
283283

284+
// fix for typo's in WF database on version numbers
285+
if(str_ends_with($vuln_version, '.')) $vuln_version = rtrim($vuln_version, '.');
286+
//print_r($vuln_version.'<br>');
287+
288+
// also check the plugin version
289+
if(str_ends_with($plugin['version'], '.')) $plugin['version'] = rtrim($plugin['version'], '.');
290+
284291
if($MainWPCheckPluginVulnerabilityActivator->hhdev_plugin_needs_update($plugin['version'],$vuln_version,$compare)) {
285292

286293
echo '<h3>'.$plugin['name'].'</h3>';

hhdev-mwpcpv.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
* Plugin Name: MainWP Check Plugins Vulnerability Extension
44
* Plugin URI: https://haha.nl
55
* Description: MainWP Extension: Use this extension to check the installed child site plugins for vulnerabilities using data from the wordfence vulnerability data feed api.
6-
* Version: 1.4.3
6+
* Version: 1.4.4
77
* Author: herbert hoekstra - haha!
88
* Author URI: https://haha.nl
99
* Documentation URI: https://haha.nl/voorbeelden/mainwp-check-plugins-vulnerability-extension/
1010
* MainWP Extension: true
1111
* Text Domain: hhdev-mwpcpv
1212
* Domain Path: /languages
1313
* Tags: mainwp, extension, security, vulnerability
14+
* Requires at least: 6.0
15+
* Requires PHP: 8.0
16+
* Required WP: 6.0
17+
* Tested up to: 6.6.2
18+
* Requires at least: 6.0
1419
* License: GPLv2 or later
1520
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1621
*/
@@ -37,7 +42,7 @@ class MainWPCheckPluginVulnerabilityActivator
3742
protected $childFile;
3843
protected $plugin_handle = 'mainwp-check-plugins-vulnerability';
3944
protected $product_id = 'MainWP Check Plugins Vulnerability Extension';
40-
protected $software_version = '1.4.3'; // used for mwp update notice
45+
protected $software_version = '1.4.4'; // used for mwp update notice
4146

4247
// set custom plugin vars
4348
// -------------------
@@ -49,8 +54,10 @@ class MainWPCheckPluginVulnerabilityActivator
4954
// file after extraction, 2 years days updated
5055
protected $file_name_vuln = 'vuln-data.json';
5156
protected $dir_path_file_vuln = WP_CONTENT_DIR . '/hhdev-mwpcpv-data/vuln-data.json';
57+
5258
protected $text_domain = 'hhdev-mwpcpv';
5359

60+
5461
// the plugin set up
5562
// --------------------
5663
public function __construct() {

0 commit comments

Comments
 (0)