|
3 | 3 | * Plugin Name: Check Plugins Vulnerability |
4 | 4 | * Plugin URI: https://haha.nl |
5 | 5 | * Description: Check the installed website plugins for vulnerability use the wordfence vulnerability data feed api. |
6 | | - * Version: 1.0.4 |
| 6 | + * Version: 1.0.5 |
7 | 7 | * Author: herbert hoekstra - haha! |
8 | 8 | * Author URI: https://haha.nl |
9 | 9 | * Documentation URI: https://haha.nl/wordpress-plug-in-op-maat/ |
@@ -228,21 +228,22 @@ public function hhdev_make_adapted_file() { |
228 | 228 | if($plugin->updated > $date) { |
229 | 229 | // write to new array |
230 | 230 | // check if type is plugin |
231 | | - if($plugin->software[0]->type === 'plugin') $file[$plugin->software[0]->slug] = array( |
| 231 | + if($plugin->software[0]->type === 'plugin' && !array_key_exists($plugin->software[0]->slug, $file)) $file[$plugin->software[0]->slug] = array( |
232 | 232 | 'title' => $plugin->title, |
233 | 233 | 'name' => $plugin->software[0]->name, |
234 | 234 | 'affected_versions' => json_decode(json_encode($plugin->software[0]->affected_versions),true), |
235 | 235 | 'patched' => $plugin->software[0]->patched, |
236 | 236 | 'references' => $plugin->references, |
237 | 237 | 'updated' => $plugin->updated, |
238 | 238 | ); |
239 | | - |
240 | 239 | //echo '<p>Progress: ' . intval($data->getPosition() / $fileSize * 100) . ' %</p>'; |
241 | 240 | } |
242 | 241 |
|
243 | 242 | } |
244 | 243 |
|
245 | | - echo wp_sprintf( '<p>', __('Records saved: %s','hhdev-mwpcpv'), count($file),'</p>'); |
| 244 | + //print_r($file['litespeed-cache']); |
| 245 | + |
| 246 | + //echo wp_sprintf( '<p>', __('Records saved: %s','hhdev-mwpcpv'), count($file),'</p>'); |
246 | 247 |
|
247 | 248 | $result = file_put_contents($this->dir_path_file_vuln, json_encode($file,JSON_UNESCAPED_UNICODE)); |
248 | 249 |
|
@@ -357,8 +358,9 @@ public function hhdev_make_adapted_file() { |
357 | 358 |
|
358 | 359 | /* |
359 | 360 | change log: |
360 | | -- 1.0.1 initial set up |
361 | | -- 1.0.2 split the file up into 2 files, plugin and dashboard |
362 | | -- 1.0.3 changed adapted file to hold only plugin data |
| 361 | +- 1.0.5 fixed missing entries in cleaned data file |
363 | 362 | - 1.0.4 removed gitignore from /vendor/ |
| 363 | +- 1.0.3 changed adapted file to hold only plugin data |
| 364 | +- 1.0.2 split the file up into 2 files, plugin and dashboard |
| 365 | +- 1.0.1 initial set up |
364 | 366 | */ |
0 commit comments