You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -80,6 +96,14 @@ No, the plugin has a simple interface where you can toggle features on and off.
80
96
* Made the plugin fully compatible with the WordPress Plugin Check tool
81
97
* Improved documentation and code comments
82
98
99
+
== Upgrade Notice ==
100
+
101
+
= 1.5.7 =
102
+
SECURITY UPDATE: This version adds important security enhancements including CSRF protection and enhanced DNS prefetch security. Update recommended for all users.
103
+
104
+
= 1.5.6 =
105
+
Major security and code quality improvements with PHPStan analysis and WordPress best practices compliance.
esc_html__('Enter one domain per line. Include the full URL (e.g., https://fonts.googleapis.com)', 'Simple-WP-Optimizer')
254
+
esc_html__('Enter one HTTPS domain per line(e.g., https://fonts.googleapis.com). Only secure HTTPS domains are allowed for security reasons.', 'Simple-WP-Optimizer')
252
255
);
253
256
254
257
// Jetpack Ads settings
@@ -355,8 +358,9 @@ function es_optimizer_render_textarea_option($options, $optionName, $title, $des
355
358
* Validate options before saving
356
359
*
357
360
* This function implements a security-focused validation system:
358
-
* 1. Checkboxes are validated to ensure they contain only boolean values (0 or 1)
359
-
* 2. DNS prefetch domains undergo multiple validation steps:
361
+
* 1. Verifies WordPress nonce for CSRF protection
362
+
* 2. Checkboxes are validated to ensure they contain only boolean values (0 or 1)
363
+
* 3. DNS prefetch domains undergo multiple validation steps:
360
364
* - Trimming to remove unwanted whitespace
361
365
* - Empty value checking
362
366
* - URL validation via filter_var()
@@ -366,6 +370,22 @@ function es_optimizer_render_textarea_option($options, $optionName, $title, $des
366
370
* @return array Validated and sanitized options
367
371
*/
368
372
functiones_optimizer_validate_options($input) {
373
+
// Security: Verify nonce for CSRF protection
374
+
if (!isset($_POST['es_optimizer_settings_nonce']) ||
0 commit comments