v5.1.0
This commit is contained in:
parent
9aef0b4533
commit
31f7e97d39
26 changed files with 719 additions and 655 deletions
|
|
@ -1,5 +1,26 @@
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= [5.1.0] - 2026-07-08 =
|
||||||
|
|
||||||
|
**Security**
|
||||||
|
|
||||||
|
* `wpvulnerability_validate_shell_command()` now uses exact `in_array()` match instead of `stripos()` substring matching for the shell-command allowlist (defense-in-depth).
|
||||||
|
* `wpvulnerability_detect_php()`, `wpvulnerability_detect_curl()`, and `wpvulnerability_detect_webserver()` now route through `wpvulnerability_safe_shell_exec()`, so every software-detection shell call is validated and recorded in the Shell Execution Audit Log. Previously these called `shell_exec()` directly, bypassing the wrapper and the audit log. As a side effect this also fixes nginx/angie version detection: `escapeshellcmd()` was escaping the `2>&1` redirect, so stderr (where nginx prints its version) was never captured.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
* Multisite uninstall fatal error: `Uncaught Error: Undefined constant "WPVULNERABILITY_PLUGIN_BASE"` when "Delete all plugin data on uninstall" was enabled. `uninstall.php` now defines the constant before loading `wpvulnerability-run.php`.
|
||||||
|
* `WPVULNERABILITY_HIDE_*` constants now stop `shell_exec` detection for hidden components during scheduled scans and in the admin "Software Detection Methods" panel. Previously they only hid the results from the UI, so the audit log kept filling with "command not found" entries for components the administrator had explicitly deactivated.
|
||||||
|
* `wpvulnerability_detect_webserver()` no longer shell-probes a hidden web server via the sibling path: `WPVULNERABILITY_HIDE_NGINX` and `WPVULNERABILITY_HIDE_APACHE` now fully isolate the hidden server.
|
||||||
|
* Multisite cron requests on non-main subsites no longer load all plugin module files. No WPVulnerability cron events are scheduled on subsites, so the extra loading was wasted work.
|
||||||
|
* LiteSpeed / OpenLiteSpeed / Caddy shell detection in the WP_DEBUG diagnostic panel now works: the commands no longer use `2>/dev/null` (which the shell-command validator rejected), `caddy` was added to the allowlist, and `which` output is validated as a real path so "command not found" messages are not mistaken for a detection.
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
* `Network: true` added to the plugin header to declare network-aware multisite behaviour.
|
||||||
|
* Removed the unused `$plugin_status` parameter from `wpvulnerability_plugin_info_after()`; the PHPCS suite now passes with zero warnings.
|
||||||
|
* Multisite network dashboard: the "Site Health" footer link pointed to `wp-admin/network/site-health.php`, which does not exist (Site Health is a per-site screen). It now links to the main site's `wp-admin/site-health.php`.
|
||||||
|
|
||||||
= [5.0.1] - 2026-06-02 =
|
= [5.0.1] - 2026-06-02 =
|
||||||
|
|
||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
25
readme.txt
25
readme.txt
|
|
@ -3,9 +3,9 @@ Contributors: javiercasares, davidperez, lbonomo, alexclassroom
|
||||||
Tags: security, vulnerability, site-health
|
Tags: security, vulnerability, site-health
|
||||||
Requires at least: 5.6
|
Requires at least: 5.6
|
||||||
Tested up to: 7.1
|
Tested up to: 7.1
|
||||||
Stable tag: 5.0.1
|
Stable tag: 5.1.0
|
||||||
Requires PHP: 7.0
|
Requires PHP: 7.0
|
||||||
Version: 5.0.1
|
Version: 5.1.0
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
License URI: https://spdx.org/licenses/GPL-3.0-or-later.html
|
License URI: https://spdx.org/licenses/GPL-3.0-or-later.html
|
||||||
|
|
||||||
|
|
@ -201,6 +201,27 @@ First of all, peace of mind. Investigate what the vulnerability is and, above al
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= [5.1.0] - 2026-07-08 =
|
||||||
|
|
||||||
|
**Security**
|
||||||
|
|
||||||
|
* `wpvulnerability_validate_shell_command()` now uses exact `in_array()` match instead of `stripos()` substring matching for the shell-command allowlist (defense-in-depth).
|
||||||
|
* `wpvulnerability_detect_php()`, `wpvulnerability_detect_curl()`, and `wpvulnerability_detect_webserver()` now route through `wpvulnerability_safe_shell_exec()`, so every software-detection shell call is validated and recorded in the Shell Execution Audit Log. Previously these called `shell_exec()` directly, bypassing the wrapper and the audit log. As a side effect this also fixes nginx/angie version detection: `escapeshellcmd()` was escaping the `2>&1` redirect, so stderr (where nginx prints its version) was never captured.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
* Multisite uninstall fatal error: `Uncaught Error: Undefined constant "WPVULNERABILITY_PLUGIN_BASE"` when "Delete all plugin data on uninstall" was enabled. `uninstall.php` now defines the constant before loading `wpvulnerability-run.php`.
|
||||||
|
* `WPVULNERABILITY_HIDE_*` constants now stop `shell_exec` detection for hidden components during scheduled scans and in the admin "Software Detection Methods" panel. Previously they only hid the results from the UI, so the audit log kept filling with "command not found" entries for components the administrator had explicitly deactivated.
|
||||||
|
* `wpvulnerability_detect_webserver()` no longer shell-probes a hidden web server via the sibling path: `WPVULNERABILITY_HIDE_NGINX` and `WPVULNERABILITY_HIDE_APACHE` now fully isolate the hidden server.
|
||||||
|
* Multisite cron requests on non-main subsites no longer load all plugin module files. No WPVulnerability cron events are scheduled on subsites, so the extra loading was wasted work.
|
||||||
|
* LiteSpeed / OpenLiteSpeed / Caddy shell detection in the WP_DEBUG diagnostic panel now works: the commands no longer use `2>/dev/null` (which the shell-command validator rejected), `caddy` was added to the allowlist, and `which` output is validated as a real path so "command not found" messages are not mistaken for a detection.
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
* `Network: true` added to the plugin header to declare network-aware multisite behaviour.
|
||||||
|
* Removed the unused `$plugin_status` parameter from `wpvulnerability_plugin_info_after()`; the PHPCS suite now passes with zero warnings.
|
||||||
|
* Multisite network dashboard: the "Site Health" footer link pointed to `wp-admin/network/site-health.php`, which does not exist (Site Health is a per-site screen). It now links to the main site's `wp-admin/site-health.php`.
|
||||||
|
|
||||||
= [5.0.1] - 2026-06-02 =
|
= [5.0.1] - 2026-06-02 =
|
||||||
|
|
||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,15 @@ if ( ! $wpvulnerability_delete_on_uninstall ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// User opted in: load the uninstall routine from the main plugin file.
|
// User opted in: load the uninstall routine from the main plugin file.
|
||||||
|
// The main plugin file is not loaded during uninstall, so the constants that
|
||||||
|
// wpvulnerability-run.php references at the top level must be defined here first
|
||||||
|
// to avoid a fatal "Undefined constant" error (see wpvulnerability-run.php top-level add_filter).
|
||||||
if ( ! defined( 'WPVULNERABILITY_PLUGIN_PATH' ) ) {
|
if ( ! defined( 'WPVULNERABILITY_PLUGIN_PATH' ) ) {
|
||||||
define( 'WPVULNERABILITY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
define( 'WPVULNERABILITY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
||||||
}
|
}
|
||||||
|
if ( ! defined( 'WPVULNERABILITY_PLUGIN_BASE' ) ) {
|
||||||
|
define( 'WPVULNERABILITY_PLUGIN_BASE', plugin_basename( WPVULNERABILITY_PLUGIN_PATH . 'wpvulnerability.php' ) );
|
||||||
|
}
|
||||||
|
|
||||||
require_once WPVULNERABILITY_PLUGIN_PATH . 'wpvulnerability-run.php';
|
require_once WPVULNERABILITY_PLUGIN_PATH . 'wpvulnerability-run.php';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3036,7 +3036,7 @@ function wpvulnerability_display_security_status() {
|
||||||
<?php if ( $log_retention > 0 ) : ?>
|
<?php if ( $log_retention > 0 ) : ?>
|
||||||
<span class="wpvulnerability-status-badge success">
|
<span class="wpvulnerability-status-badge success">
|
||||||
<?php
|
<?php
|
||||||
/* translators: %d: number of days */
|
/* translators: %d: Number of days. */
|
||||||
echo esc_html( sprintf( __( 'Enabled (%d days)', 'wpvulnerability' ), $log_retention ) );
|
echo esc_html( sprintf( __( 'Enabled (%d days)', 'wpvulnerability' ), $log_retention ) );
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -3110,6 +3110,12 @@ function wpvulnerability_display_detection_methods() {
|
||||||
foreach ( array_keys( $components ) as $component ) {
|
foreach ( array_keys( $components ) as $component ) {
|
||||||
$detection = null;
|
$detection = null;
|
||||||
|
|
||||||
|
// Do not run detection for components hidden via the analysis settings or
|
||||||
|
// a WPVULNERABILITY_HIDE_* constant: they must not trigger shell_exec.
|
||||||
|
if ( ! wpvulnerability_analyze_filter( $component ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
switch ( $component ) {
|
switch ( $component ) {
|
||||||
case 'imagemagick':
|
case 'imagemagick':
|
||||||
$detection = wpvulnerability_detect_imagemagick();
|
$detection = wpvulnerability_detect_imagemagick();
|
||||||
|
|
@ -3638,7 +3644,7 @@ function wpvulnerability_render_debug_section_config() {
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$retention_days = isset( $config['log_retention_days'] ) && is_scalar( $config['log_retention_days'] ) ? absint( (int) $config['log_retention_days'] ) : 14;
|
$retention_days = isset( $config['log_retention_days'] ) && is_scalar( $config['log_retention_days'] ) ? absint( (int) $config['log_retention_days'] ) : 14;
|
||||||
/* translators: %d: number of days */
|
/* translators: %d: Number of days. */
|
||||||
echo esc_html( sprintf( _n( '%d day', '%d days', $retention_days, 'wpvulnerability' ), $retention_days ) );
|
echo esc_html( sprintf( _n( '%d day', '%d days', $retention_days, 'wpvulnerability' ), $retention_days ) );
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -2736,7 +2736,7 @@ function wpvulnerability_admin_dashboard_content() {
|
||||||
// Footer links.
|
// Footer links.
|
||||||
echo '<div class="wpvuln-footer">';
|
echo '<div class="wpvuln-footer">';
|
||||||
if ( version_compare( get_bloginfo( 'version' ), '5.2', '>=' ) ) {
|
if ( version_compare( get_bloginfo( 'version' ), '5.2', '>=' ) ) {
|
||||||
echo '<a href="' . esc_url( network_admin_url( 'site-health.php' ) ) . '">' . esc_html( __( 'Site Health', 'wpvulnerability' ) ) . '</a> | ';
|
echo '<a href="' . esc_url( get_admin_url( get_main_site_id(), 'site-health.php' ) ) . '">' . esc_html( __( 'Site Health', 'wpvulnerability' ) ) . '</a> | ';
|
||||||
}
|
}
|
||||||
echo '<a href="' . esc_url( network_admin_url( 'settings.php?page=wpvulnerability-options' ) ) . '">' . esc_html( __( 'Settings', 'wpvulnerability' ) ) . '</a>';
|
echo '<a href="' . esc_url( network_admin_url( 'settings.php?page=wpvulnerability-options' ) ) . '">' . esc_html( __( 'Settings', 'wpvulnerability' ) ) . '</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
@ -3215,7 +3215,7 @@ function wpvulnerability_display_security_status() {
|
||||||
<?php if ( $log_retention > 0 ) : ?>
|
<?php if ( $log_retention > 0 ) : ?>
|
||||||
<span class="wpvulnerability-status-badge success">
|
<span class="wpvulnerability-status-badge success">
|
||||||
<?php
|
<?php
|
||||||
/* translators: %d: number of days */
|
/* translators: %d: Number of days. */
|
||||||
echo esc_html( sprintf( __( 'Enabled (%d days)', 'wpvulnerability' ), $log_retention ) );
|
echo esc_html( sprintf( __( 'Enabled (%d days)', 'wpvulnerability' ), $log_retention ) );
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -3289,6 +3289,12 @@ function wpvulnerability_display_detection_methods() {
|
||||||
foreach ( array_keys( $components ) as $component ) {
|
foreach ( array_keys( $components ) as $component ) {
|
||||||
$detection = null;
|
$detection = null;
|
||||||
|
|
||||||
|
// Do not run detection for components hidden via the analysis settings or
|
||||||
|
// a WPVULNERABILITY_HIDE_* constant: they must not trigger shell_exec.
|
||||||
|
if ( ! wpvulnerability_analyze_filter( $component ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
switch ( $component ) {
|
switch ( $component ) {
|
||||||
case 'imagemagick':
|
case 'imagemagick':
|
||||||
$detection = wpvulnerability_detect_imagemagick();
|
$detection = wpvulnerability_detect_imagemagick();
|
||||||
|
|
@ -3834,7 +3840,7 @@ function wpvulnerability_render_debug_section_config() {
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$retention_days = isset( $config['log_retention_days'] ) && is_scalar( $config['log_retention_days'] ) ? absint( (int) $config['log_retention_days'] ) : 14;
|
$retention_days = isset( $config['log_retention_days'] ) && is_scalar( $config['log_retention_days'] ) ? absint( (int) $config['log_retention_days'] ) : 14;
|
||||||
/* translators: %d: number of days */
|
/* translators: %d: Number of days. */
|
||||||
echo esc_html( sprintf( _n( '%d day', '%d days', $retention_days, 'wpvulnerability' ), $retention_days ) );
|
echo esc_html( sprintf( _n( '%d day', '%d days', $retention_days, 'wpvulnerability' ), $retention_days ) );
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue