Changeset 3443352
- Timestamp:
- 01/20/2026 03:01:45 PM (2 months ago)
- Location:
- wpvulnerability
- Files:
-
- 57 added
- 6 edited
-
tags/4.3.1 (added)
-
tags/4.3.1/LICENSE (added)
-
tags/4.3.1/assets (added)
-
tags/4.3.1/assets/admin.css (added)
-
tags/4.3.1/assets/admin.css.backup (added)
-
tags/4.3.1/assets/admin.js (added)
-
tags/4.3.1/assets/banner-1544x500.png (added)
-
tags/4.3.1/assets/banner-772x250.png (added)
-
tags/4.3.1/assets/icon-128x128.png (added)
-
tags/4.3.1/assets/icon-256x256.png (added)
-
tags/4.3.1/assets/icon-apache.svg (added)
-
tags/4.3.1/assets/icon-curl.svg (added)
-
tags/4.3.1/assets/icon-imagemagick.svg (added)
-
tags/4.3.1/assets/icon-mariadb.svg (added)
-
tags/4.3.1/assets/icon-memcached.svg (added)
-
tags/4.3.1/assets/icon-mysql.svg (added)
-
tags/4.3.1/assets/icon-nginx.svg (added)
-
tags/4.3.1/assets/icon-php.svg (added)
-
tags/4.3.1/assets/icon-plugin.svg (added)
-
tags/4.3.1/assets/icon-redis.svg (added)
-
tags/4.3.1/assets/icon-sqlite.svg (added)
-
tags/4.3.1/assets/icon-theme.svg (added)
-
tags/4.3.1/assets/icon-wordpress.svg (added)
-
tags/4.3.1/assets/icon.svg (added)
-
tags/4.3.1/assets/logobug-128.png (added)
-
tags/4.3.1/assets/logobug-16.png (added)
-
tags/4.3.1/assets/logobug-256.png (added)
-
tags/4.3.1/assets/logobug-32.png (added)
-
tags/4.3.1/assets/logobug-512.png (added)
-
tags/4.3.1/assets/logobug.png (added)
-
tags/4.3.1/assets/logobug.svg (added)
-
tags/4.3.1/assets/screenshot-1.png (added)
-
tags/4.3.1/assets/screenshot-2.png (added)
-
tags/4.3.1/assets/screenshot-3.png (added)
-
tags/4.3.1/changelog.txt (added)
-
tags/4.3.1/class-wpvulnerability-cli.php (added)
-
tags/4.3.1/class-wpvulnerability-config-cli.php (added)
-
tags/4.3.1/languages (added)
-
tags/4.3.1/languages/wpvulnerability.pot (added)
-
tags/4.3.1/readme.txt (added)
-
tags/4.3.1/security.txt (added)
-
tags/4.3.1/wpvulnerability-admin.php (added)
-
tags/4.3.1/wpvulnerability-adminms.php (added)
-
tags/4.3.1/wpvulnerability-api.php (added)
-
tags/4.3.1/wpvulnerability-core.php (added)
-
tags/4.3.1/wpvulnerability-debug.php (added)
-
tags/4.3.1/wpvulnerability-general.php (added)
-
tags/4.3.1/wpvulnerability-notifications.php (added)
-
tags/4.3.1/wpvulnerability-plugins.php (added)
-
tags/4.3.1/wpvulnerability-process.php (added)
-
tags/4.3.1/wpvulnerability-run.php (added)
-
tags/4.3.1/wpvulnerability-schedule.php (added)
-
tags/4.3.1/wpvulnerability-sitehealth.php (added)
-
tags/4.3.1/wpvulnerability-software.php (added)
-
tags/4.3.1/wpvulnerability-themes.php (added)
-
tags/4.3.1/wpvulnerability.php (added)
-
trunk/LICENSE (added)
-
trunk/assets/admin.css (modified) (7 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wpvulnerability-admin.php (modified) (5 diffs)
-
trunk/wpvulnerability-adminms.php (modified) (19 diffs)
-
trunk/wpvulnerability.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpvulnerability/trunk/assets/admin.css
r3442647 r3443352 121 121 122 122 /* ================================================== 123 WPVulnerability Admin Panel Styles124 Extracted from inline <style> blocks125 ================================================== */123 WPVulnerability Admin Panel Styles 124 Extracted from inline <style> blocks 125 ================================================== */ 126 126 127 127 /* ================================================== 128 Notifications Panel129 ================================================== */128 Notifications Panel 129 ================================================== */ 130 130 .wpvulnerability-notifications-panel .wpvulnerability-security-section { 131 131 background: #fff; … … 282 282 283 283 /* ================================================== 284 Analysis Panel285 ================================================== */284 Analysis Panel 285 ================================================== */ 286 286 .wpvulnerability-analysis-panel .wpvulnerability-security-section { 287 287 background: #fff; … … 438 438 439 439 /* ================================================== 440 Logs Panel441 ================================================== */440 Logs Panel 441 ================================================== */ 442 442 .wpvulnerability-logs-panel .wpvulnerability-security-section { 443 443 background: #fff; … … 699 699 700 700 /* ================================================== 701 Tools Panel702 ================================================== */701 Tools Panel 702 ================================================== */ 703 703 .wpvulnerability-tools-panel .wpvulnerability-tool-card { 704 704 background: #fff; … … 838 838 839 839 /* ================================================== 840 About Panel841 ================================================== */840 About Panel 841 ================================================== */ 842 842 .wpvulnerability-about-panel .wpvulnerability-security-section { 843 843 background: #fff; … … 962 962 963 963 /* ================================================== 964 Dashboard Widget965 ================================================== */964 Dashboard Widget 965 ================================================== */ 966 966 .wpvuln-status-badge { 967 967 display: inline-block; … … 1065 1065 1066 1066 /* ================================================== 1067 Security Panel1068 ================================================== */1067 Security Panel 1068 ================================================== */ 1069 1069 .wpvulnerability-security-panel h2 { 1070 1070 margin-top: 0; -
wpvulnerability/trunk/changelog.txt
r3442647 r3443352 1 1 == Changelog == 2 3 = [4.3.1] - 2026-01-20 = 4 5 **Fixed** 6 7 * Dashboard widget now correctly counts only vulnerabilities from enabled components, excluding disabled ones from settings. 8 * Status badge calculation (Critical/Warning) now properly considers only enabled components when determining severity level. 9 * Fixed PHPCS warnings for global variables without plugin prefix in wpvulnerability-admin.php and wpvulnerability-adminms.php. 10 11 **Compatibility** 12 13 * WordPress: 4.7 - 6.9 14 * PHP: 5.6 - 8.5 15 * WP-CLI: 2.3.0 - 2.11.0 16 17 **Tests** 18 19 * PHP Coding Standards: 3.13.5 20 * WordPress Coding Standards: 3.3.0 21 * Plugin Check (PCP): 1.8.0 2 22 3 23 = [4.3.0] - 2026-01-19 = -
wpvulnerability/trunk/readme.txt
r3442647 r3443352 4 4 Requires at least: 4.7 5 5 Tested up to: 6.9 6 Stable tag: 4.3. 06 Stable tag: 4.3.1 7 7 Requires PHP: 5.6 8 Version: 4.3. 08 Version: 4.3.1 9 9 License: GPL-3.0-or-later 10 10 License URI: https://spdx.org/licenses/GPL-3.0-or-later.html … … 147 147 148 148 Maximum security (no shell commands): 149 149 150 `define( 'WPVULNERABILITY_SECURITY_MODE', 'strict' );` 150 151 151 152 Only allow ImageMagick shell detection: 153 152 154 `define( 'WPVULNERABILITY_SHELL_EXEC_WHITELIST', 'imagemagick' );` 153 155 154 156 Complete disable: 157 155 158 `define( 'WPVULNERABILITY_DISABLE_SHELL_EXEC', true );` 156 159 … … 198 201 199 202 == Changelog == 203 204 = [4.3.1] - 2026-01-20 = 205 206 **Fixed** 207 208 * Dashboard widget now correctly counts only vulnerabilities from enabled components, excluding disabled ones from settings. 209 * Status badge calculation (Critical/Warning) now properly considers only enabled components when determining severity level. 210 * Fixed PHPCS warnings for global variables without plugin prefix in wpvulnerability-admin.php and wpvulnerability-adminms.php. 211 212 **Compatibility** 213 214 * WordPress: 4.7 - 6.9 215 * PHP: 5.6 - 8.5 216 * WP-CLI: 2.3.0 - 2.11.0 217 218 **Tests** 219 220 * PHP Coding Standards: 3.13.5 221 * WordPress Coding Standards: 3.3.0 222 * Plugin Check (PCP): 1.8.0 200 223 201 224 = [4.3.0] - 2026-01-19 = -
wpvulnerability/trunk/wpvulnerability-admin.php
r3442647 r3443352 189 189 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-debug.php'; 190 190 } 191 $ debug_info = wpvulnerability_debug_export_info();192 $ filename = 'wpvulnerability-debug-' . gmdate( 'Y-m-d-His' ) . '.json';191 $wpvulnerability_debug_info = wpvulnerability_debug_export_info(); 192 $wpvulnerability_filename = 'wpvulnerability-debug-' . gmdate( 'Y-m-d-His' ) . '.json'; 193 193 194 194 header( 'Content-Type: application/json' ); 195 header( 'Content-Disposition: attachment; filename="' . $ filename . '"' );196 header( 'Content-Length: ' . strlen( $ debug_info ) );197 echo $ debug_info; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped195 header( 'Content-Disposition: attachment; filename="' . $wpvulnerability_filename . '"' ); 196 header( 'Content-Length: ' . strlen( $wpvulnerability_debug_info ) ); 197 echo $wpvulnerability_debug_info; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 198 198 exit; 199 199 } else { … … 231 231 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php'; 232 232 } 233 $ result = wpvulnerability_execute_notification( true );234 if ( $ result ) {233 $wpvulnerability_result = wpvulnerability_execute_notification( true ); 234 if ( $wpvulnerability_result ) { 235 235 set_transient( 'wpvulnerability_message_manual_success', __( 'Notification has been sent.', 'wpvulnerability' ), 10 ); 236 236 } else { … … 2284 2284 $sqlite_count = (int) json_decode( get_option( 'wpvulnerability-sqlite-vulnerable' ), true ); 2285 2285 2286 // Calculate total vulnerabilities. 2287 $total_vulnerabilities = $core_count + $plugins_count + $themes_count + $php_count + 2288 $apache_count + $nginx_count + $mariadb_count + $mysql_count + 2289 $imagemagick_count + $curl_count + $memcached_count + $redis_count + $sqlite_count; 2286 // Calculate total vulnerabilities (only for enabled components). 2287 $total_vulnerabilities = 0; 2288 if ( wpvulnerability_analyze_filter( 'core' ) ) { 2289 $total_vulnerabilities += $core_count; 2290 } 2291 if ( wpvulnerability_analyze_filter( 'plugins' ) ) { 2292 $total_vulnerabilities += $plugins_count; 2293 } 2294 if ( wpvulnerability_analyze_filter( 'themes' ) ) { 2295 $total_vulnerabilities += $themes_count; 2296 } 2297 if ( wpvulnerability_analyze_filter( 'php' ) ) { 2298 $total_vulnerabilities += $php_count; 2299 } 2300 if ( wpvulnerability_analyze_filter( 'apache' ) ) { 2301 $total_vulnerabilities += $apache_count; 2302 } 2303 if ( wpvulnerability_analyze_filter( 'nginx' ) ) { 2304 $total_vulnerabilities += $nginx_count; 2305 } 2306 if ( wpvulnerability_analyze_filter( 'mariadb' ) ) { 2307 $total_vulnerabilities += $mariadb_count; 2308 } 2309 if ( wpvulnerability_analyze_filter( 'mysql' ) ) { 2310 $total_vulnerabilities += $mysql_count; 2311 } 2312 if ( wpvulnerability_analyze_filter( 'imagemagick' ) ) { 2313 $total_vulnerabilities += $imagemagick_count; 2314 } 2315 if ( wpvulnerability_analyze_filter( 'curl' ) ) { 2316 $total_vulnerabilities += $curl_count; 2317 } 2318 if ( wpvulnerability_analyze_filter( 'memcached' ) ) { 2319 $total_vulnerabilities += $memcached_count; 2320 } 2321 if ( wpvulnerability_analyze_filter( 'redis' ) ) { 2322 $total_vulnerabilities += $redis_count; 2323 } 2324 if ( wpvulnerability_analyze_filter( 'sqlite' ) ) { 2325 $total_vulnerabilities += $sqlite_count; 2326 } 2290 2327 2291 2328 // Determine status badge. … … 2295 2332 2296 2333 if ( $total_vulnerabilities > 0 ) { 2297 if ( $core_count > 0 || $php_count > 0 || $total_vulnerabilities > 5 ) { 2334 if ( ( wpvulnerability_analyze_filter( 'core' ) && $core_count > 0 ) || 2335 ( wpvulnerability_analyze_filter( 'php' ) && $php_count > 0 ) || 2336 $total_vulnerabilities > 5 ) { 2298 2337 $status_class = 'wpvuln-status-critical'; 2299 2338 $status_icon = '✕'; … … 3028 3067 3029 3068 // Test API. 3030 $ result = wpvulnerability_debug_test_api_component( $component );3031 3032 wp_send_json_success( $ result );3069 $wpvulnerability_result = wpvulnerability_debug_test_api_component( $component ); 3070 3071 wp_send_json_success( $wpvulnerability_result ); 3033 3072 } 3034 3073 add_action( 'wp_ajax_wpvulnerability_test_api', 'wpvulnerability_ajax_test_api' ); -
wpvulnerability/trunk/wpvulnerability-adminms.php
r3442647 r3443352 79 79 if ( check_admin_referer( 'wpvulnerability_nonce', 'wpauto_nonce' ) ) { 80 80 81 if ( isset( $_POST['wpvulnerability-config'] ) ) {81 if ( isset( $_POST['wpvulnerability-config'] ) ) { 82 82 83 83 $post_config = filter_input( INPUT_POST, 'wpvulnerability-config', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); … … 211 211 * @since 3.0.0 212 212 */ 213 if ( isset( $_POST['wpvulnerability_reset'] ) && check_admin_referer( 'wpvulnerability_reset_action', 'wpvulnerability_reset_nonce' ) ) {214 213 if ( isset( $_POST['wpvulnerability_reset'] ) && check_admin_referer( 'wpvulnerability_reset_action', 'wpvulnerability_reset_nonce' ) ) { 214 215 215 if ( current_user_can( 'manage_network_options' ) ) { 216 216 // Calls the reset function. 217 217 wpvulnerability_update_database_data(); 218 218 219 219 set_transient( 'wpvulnerability_message_manual_success', __( 'Data from source has been reloaded.', 'wpvulnerability' ), 10 ); 220 220 } else { … … 222 222 } 223 223 } 224 224 225 225 /** 226 226 * Send an test email … … 229 229 */ 230 230 if ( isset( $_POST['wpvulnerability_email'] ) && check_admin_referer( 'wpvulnerability_email_action', 'wpvulnerability_email_nonce' ) ) { 231 231 232 232 if ( ! function_exists( 'wpvulnerability_execute_notification' ) ) { 233 233 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-core.php'; … … 238 238 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php'; 239 239 } 240 240 241 241 // Calls the notifications function, forced. 242 242 if ( current_user_can( 'manage_network_options' ) ) { 243 243 $wpmail = wpvulnerability_execute_notification( true ); 244 244 245 245 if ( $wpmail ) { 246 246 247 247 set_transient( 'wpvulnerability_message_manual_success', __( 'Test email has been sent.', 'wpvulnerability' ), 10 ); 248 248 249 249 } else { 250 250 251 251 set_transient( 'wpvulnerability_message_manual_error', __( 'Test email has failed. Please, check your email settings.', 'wpvulnerability' ), 10 ); 252 252 253 253 } 254 254 } else { … … 256 256 } 257 257 } 258 258 259 259 /** 260 260 * Repairs scheduled cron events across the network. … … 265 265 if ( current_user_can( 'manage_network_options' ) ) { 266 266 $wpvulnerability_settings = get_site_option( 'wpvulnerability-config', array() ); 267 $cron_config = is_array( $wpvulnerability_settings ) ? $wpvulnerability_settings : array();267 $cron_config = is_array( $wpvulnerability_settings ) ? $wpvulnerability_settings : array(); 268 268 wpvulnerability_repair_network_cron_events( $cron_config ); 269 269 set_transient( 'wpvulnerability_message_manual_success', __( 'WPVulnerability cron events have been repaired across the network.', 'wpvulnerability' ), 10 ); … … 272 272 } 273 273 } 274 274 275 275 /** 276 276 * Delete all stored API logs across the network. … … 286 286 } 287 287 } 288 288 289 289 /** 290 290 * Fully resets plugin data, settings, and cached API content across the network. … … 300 300 } 301 301 } 302 302 303 303 /** 304 304 * Handles debug action: Clear all caches. … … 317 317 } 318 318 } 319 319 320 320 /** 321 321 * Handles debug action: Reset signatures. … … 334 334 } 335 335 } 336 336 337 337 /** 338 338 * Handles debug action: Export debug info. … … 345 345 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-debug.php'; 346 346 } 347 $ debug_info = wpvulnerability_debug_export_info();348 $ filename = 'wpvulnerability-debug-' . gmdate( 'Y-m-d-His' ) . '.json';349 347 $wpvulnerability_debug_info = wpvulnerability_debug_export_info(); 348 $wpvulnerability_filename = 'wpvulnerability-debug-' . gmdate( 'Y-m-d-His' ) . '.json'; 349 350 350 header( 'Content-Type: application/json' ); 351 header( 'Content-Disposition: attachment; filename="' . $ filename . '"' );352 header( 'Content-Length: ' . strlen( $ debug_info ) );353 echo $ debug_info; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped351 header( 'Content-Disposition: attachment; filename="' . $wpvulnerability_filename . '"' ); 352 header( 'Content-Length: ' . strlen( $wpvulnerability_debug_info ) ); 353 echo $wpvulnerability_debug_info; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 354 354 exit; 355 355 } else { … … 357 357 } 358 358 } 359 359 360 360 /** 361 361 * Handles debug action: Run update database now. … … 371 371 } 372 372 } 373 373 374 374 /** 375 375 * Handles debug action: Run notification now. … … 387 387 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php'; 388 388 } 389 $ result = wpvulnerability_execute_notification( true );390 if ( $ result ) {389 $wpvulnerability_result = wpvulnerability_execute_notification( true ); 390 if ( $wpvulnerability_result ) { 391 391 set_transient( 'wpvulnerability_message_manual_success', __( 'Notification has been sent.', 'wpvulnerability' ), 10 ); 392 392 } else { … … 2189 2189 $sqlite_count = (int) json_decode( get_site_option( 'wpvulnerability-sqlite-vulnerable' ), true ); 2190 2190 2191 // Calculate total vulnerabilities. 2192 $total_vulnerabilities = $core_count + $plugins_count + $themes_count + $php_count + 2193 $apache_count + $nginx_count + $mariadb_count + $mysql_count + 2194 $imagemagick_count + $curl_count + $memcached_count + $redis_count + $sqlite_count; 2191 // Calculate total vulnerabilities (only for enabled components). 2192 $total_vulnerabilities = 0; 2193 if ( wpvulnerability_analyze_filter( 'core' ) ) { 2194 $total_vulnerabilities += $core_count; 2195 } 2196 if ( wpvulnerability_analyze_filter( 'plugins' ) ) { 2197 $total_vulnerabilities += $plugins_count; 2198 } 2199 if ( wpvulnerability_analyze_filter( 'themes' ) ) { 2200 $total_vulnerabilities += $themes_count; 2201 } 2202 if ( wpvulnerability_analyze_filter( 'php' ) ) { 2203 $total_vulnerabilities += $php_count; 2204 } 2205 if ( wpvulnerability_analyze_filter( 'apache' ) ) { 2206 $total_vulnerabilities += $apache_count; 2207 } 2208 if ( wpvulnerability_analyze_filter( 'nginx' ) ) { 2209 $total_vulnerabilities += $nginx_count; 2210 } 2211 if ( wpvulnerability_analyze_filter( 'mariadb' ) ) { 2212 $total_vulnerabilities += $mariadb_count; 2213 } 2214 if ( wpvulnerability_analyze_filter( 'mysql' ) ) { 2215 $total_vulnerabilities += $mysql_count; 2216 } 2217 if ( wpvulnerability_analyze_filter( 'imagemagick' ) ) { 2218 $total_vulnerabilities += $imagemagick_count; 2219 } 2220 if ( wpvulnerability_analyze_filter( 'curl' ) ) { 2221 $total_vulnerabilities += $curl_count; 2222 } 2223 if ( wpvulnerability_analyze_filter( 'memcached' ) ) { 2224 $total_vulnerabilities += $memcached_count; 2225 } 2226 if ( wpvulnerability_analyze_filter( 'redis' ) ) { 2227 $total_vulnerabilities += $redis_count; 2228 } 2229 if ( wpvulnerability_analyze_filter( 'sqlite' ) ) { 2230 $total_vulnerabilities += $sqlite_count; 2231 } 2195 2232 2196 2233 // Determine status badge. … … 2200 2237 2201 2238 if ( $total_vulnerabilities > 0 ) { 2202 if ( $core_count > 0 || $php_count > 0 || $total_vulnerabilities > 5 ) { 2239 if ( ( wpvulnerability_analyze_filter( 'core' ) && $core_count > 0 ) || 2240 ( wpvulnerability_analyze_filter( 'php' ) && $php_count > 0 ) || 2241 $total_vulnerabilities > 5 ) { 2203 2242 $status_class = 'wpvuln-status-critical'; 2204 2243 $status_icon = '✕'; … … 3275 3314 3276 3315 // Test API. 3277 $ result = wpvulnerability_debug_test_api_component( $component );3278 3279 wp_send_json_success( $ result );3316 $wpvulnerability_result = wpvulnerability_debug_test_api_component( $component ); 3317 3318 wp_send_json_success( $wpvulnerability_result ); 3280 3319 } 3281 3320 add_action( 'wp_ajax_wpvulnerability_test_api', 'wpvulnerability_ajax_network_test_api' ); -
wpvulnerability/trunk/wpvulnerability.php
r3442647 r3443352 2 2 /** 3 3 * Plugin Name: WPVulnerability 4 * Plugin URI: https://www.wpvulnerability.com/ 4 * Plugin URI: https://www.wpvulnerability.com/plugin/ 5 5 * Description: Receive information about possible vulnerabilities in your WordPress from WordPress Vulnerability Database API. 6 6 * Requires at least: 4.7 7 7 * Requires PHP: 5.6 8 * Version: 4.3. 09 * Author: Javier Casares10 * Author URI: https://www. javiercasares.com/11 * License: GPL- 2.0-or-later12 * License URI: https:// spdx.org/licenses/GPL-2.0-or-later.html8 * Version: 4.3.1 9 * Author: ROBOTSTXT 10 * Author URI: https://www.robotstxt.es/ 11 * License: GPL-3.0-or-later 12 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt 13 13 * Text Domain: wpvulnerability 14 14 * Domain Path: /languages … … 24 24 * Set some constants that I can change in future versions. 25 25 */ 26 define( 'WPVULNERABILITY_PLUGIN_VERSION', '4.3. 0' );26 define( 'WPVULNERABILITY_PLUGIN_VERSION', '4.3.1' ); 27 27 define( 'WPVULNERABILITY_API_HOST', 'https://www.wpvulnerability.net/' ); 28 28
Note: See TracChangeset
for help on using the changeset viewer.