From dbcc75fea7b2ae72d4f8f8b903ab1bddc6dd1c08 Mon Sep 17 00:00:00 2001 From: Javier Casares Date: Tue, 3 Nov 2026 17:54:40 +0000 Subject: [PATCH] v2.1.2 --- changelog.txt | 62 ++++++++++++++++ languages/replyto-ca.mo | Bin 6934 -> 6934 bytes languages/replyto-ca.po | 2 +- languages/replyto-es_ES.mo | Bin 7046 -> 7046 bytes languages/replyto-es_ES.po | 2 +- languages/replyto.pot | 100 ++++++++++++------------- readme.txt | 147 ++++++++++++++++++------------------- replyto.php | 40 ++++------ 8 files changed, 199 insertions(+), 154 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9236de6..82ce388 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,67 @@ == Changelog == += 2.1.2 = + +_Release date: 2026-11-03_ + +**Highlights** + +* Legacy v1 options no longer wiped on save, and WordPress 7.2 / PHP 8.6 compatibility declared and verified. + +**Fixed** + +* Legacy v1.0.x Reply-To options (wp_mail_replyto_email, wp_mail_replyto_name) were emptied on every settings save, destroying the rollback/migration fallback values; on PHP 8.1+ hosts the same code path logged a sanitize_email() deprecation (found in debug.log review). Root cause: the options were registered in the Settings API group while the settings form no longer posts them, so wp-admin/options.php passed null to update_option() for each of them. Fix: the options are no longer part of the settings group, so their values survive every save and no null ever reaches the sanitizers. + +**Changed** + +* Development tooling updated via composer update (PHPStan 2.2.14 → 2.3.5, wp-compat 2.0.1 → 3.0.1, wordpress-stubs 7.1.0 → 7.1.2, PHPUnit 9.6.36 → 9.6.38). +* phpcompatibility/php-compatibility 9.3.5 → 10.0.0-alpha2 (dev-only dependency): the 9.x line cannot see PHP 8.x syntax, so previous "5.6-8.5" scans were blind above 7.4; the 10.x line genuinely scans PHP 5.6 through 8.6 (sniff verified against a known 8.0-only construct). +* bin/preflight.sh PHPCompatibility scan upper bound raised from 8.5 to 8.6. +* AGENTS default compatibility windows updated (WordPress 7.0-7.2, PHP 8.3-8.6 development target). + +**Compatibility** + +* WordPress: 4.7 - 7.2 (Tested up to raised to 7.2 after smoke tests on WordPress 7.2-beta4 single-site staging — MariaDB 11.8.9 — covering settings page render, options.php save path, context sanitization, and wp_mail Reply-To injection; WordPress floor re-verified with wp-compat 3.0.1 enforcing Requires at least 4.7). +* PHP: 5.6 - 8.6 (PHPCompatibility scan 5.6-8.6 clean; the 87-test PHPUnit suite green on PHP 7.4, 8.2, 8.3, 8.4, 8.5, and 8.6.0RC3; syntax lint passes on every PHP binary 5.6 through 8.6; PHP floor stays 5.6 — the real lowest compatible version). + +**Tests** + +* PHP Coding Standards: 3.13.6 +* WordPress Coding Standards: 3.4.1 +* PHPCompatibility: 10.0.0-alpha2 (range 5.6-8.6) +* PHPStan: 2.3.5 (level 9, wp-compat 3.0.1) +* PHPUnit: 9.6.38 — 87 tests (86 → 87: added regression test asserting the legacy options stay out of the settings group) +* Plugin Check (PCP): 0 errors on the release package (4 accepted warnings, unchanged: trademarked_term x2, load_plugin_textdomain, $site_id in uninstall.php) + += 2.1.1 = + +_Release date: 2026-09-18_ + +**Highlights** + +* Security hardening patch: settings error messages now escape the context label, and the deferred review items are closed out. No behavior change. + +**Security** + +* Context name in settings error/warning messages (invalid email, DNS domain warning, name truncation) now escaped at output time via esc_html() — defense in depth for translated labels. + +**Changed** + +* Known-issues triage closed: load_plugin_textdomain() accepted (bundled translations in /languages must load even before GlotPress coverage); trademarked_term accepted (not a problem per maintainer); switch_to_blog() uninstall sweep confirmed as the standard pattern — batched get_sites() pagination documented as the fallback for very large networks. +* composer update re-run: no dependency changes (already current). + +**Compatibility** + +* WordPress: 4.7 - 7.1 (7.2 not yet released — expected December 2026 — so Tested up to stays at 7.1) +* PHP: 5.6 - 8.5 + +**Tests** + +* PHP Coding Standards: 3.13.6 +* WordPress Coding Standards: 3.4.1 +* PHPStan: 2.2.14 (level 9) +* PHPUnit: 9.6.36 + = 2.1.0 = _Release date: 2026-09-18_ diff --git a/languages/replyto-ca.mo b/languages/replyto-ca.mo index dc9baa06f3058047cb523457dfae9f2f0c6417aa..6d27c0acaa4024fa6b4531b2097d732f3c0bce6b 100644 GIT binary patch delta 14 VcmbPcHqC5\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2026-09-18T14:58:16+00:00\n" +"POT-Creation-Date: 2026-11-03T17:05:34+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.12.0\n" "X-Domain: replyto\n" @@ -39,191 +39,191 @@ msgstr "" msgid "https://www.robotstxt.software/" msgstr "" -#: replyto.php:401 +#: replyto.php:403 msgid "WP Mail Reply-To Settings" msgstr "" -#: replyto.php:402 +#: replyto.php:404 msgid "Reply-To" msgstr "" -#: replyto.php:535 -#: replyto.php:762 +#: replyto.php:523 +#: replyto.php:753 msgid "Default" msgstr "" -#: replyto.php:536 +#: replyto.php:524 msgid "Authentication" msgstr "" -#: replyto.php:537 +#: replyto.php:525 msgid "Comments" msgstr "" -#: replyto.php:538 +#: replyto.php:526 msgid "Users" msgstr "" -#: replyto.php:539 +#: replyto.php:527 msgid "System" msgstr "" -#: replyto.php:540 -#: replyto.php:791 +#: replyto.php:528 +#: replyto.php:782 msgid "WooCommerce" msgstr "" #. translators: %s: context name -#: replyto.php:580 +#: replyto.php:568 #, php-format msgid "Invalid email address for %s context." msgstr "" #. translators: %s: context name -#: replyto.php:596 +#: replyto.php:584 #, php-format msgid "Warning: The email domain for %s context does not appear to have valid DNS records." msgstr "" #. translators: %s: context name -#: replyto.php:611 -#: replyto.php:621 +#: replyto.php:599 +#: replyto.php:609 #, php-format msgid "Name for %s context was truncated to 255 characters." msgstr "" -#: replyto.php:661 +#: replyto.php:649 msgid "Reply-To configuration updated successfully." msgstr "" -#: replyto.php:744 +#: replyto.php:732 msgid "You do not have sufficient permissions to access this page." msgstr "" -#: replyto.php:763 +#: replyto.php:754 msgid "Default Reply-To used for all emails that do not match a specific context. This is the fallback when other contexts are not configured." msgstr "" -#: replyto.php:764 +#: replyto.php:755 msgid "Newsletter confirmations, general notifications, and any emails not covered by other contexts." msgstr "" -#: replyto.php:767 +#: replyto.php:758 msgid "Authentication & Security" msgstr "" -#: replyto.php:768 +#: replyto.php:759 msgid "Reply-To for password resets, password changes, and email address changes." msgstr "" -#: replyto.php:769 +#: replyto.php:760 msgid "Password reset requests, password change confirmations, email address verifications." msgstr "" -#: replyto.php:772 +#: replyto.php:763 msgid "Comments & Moderation" msgstr "" -#: replyto.php:773 +#: replyto.php:764 msgid "Reply-To for comment notifications and moderation alerts." msgstr "" -#: replyto.php:774 +#: replyto.php:765 msgid "New comment notifications, comment moderation alerts, comment replies." msgstr "" -#: replyto.php:777 +#: replyto.php:768 msgid "Users & Registration" msgstr "" -#: replyto.php:778 +#: replyto.php:769 msgid "Reply-To for new user registrations, role changes, and user management emails." msgstr "" -#: replyto.php:779 +#: replyto.php:770 msgid "New user welcome emails, user role changes, account activations." msgstr "" -#: replyto.php:782 +#: replyto.php:773 msgid "System & Updates" msgstr "" -#: replyto.php:783 +#: replyto.php:774 msgid "Reply-To for automatic updates, system alerts, and critical site health notifications." msgstr "" -#: replyto.php:784 +#: replyto.php:775 msgid "WordPress core updates, plugin updates, theme updates, recovery mode, fatal error notifications." msgstr "" -#: replyto.php:792 +#: replyto.php:783 msgid "Reply-To for WooCommerce order notifications, invoices, and customer communications." msgstr "" -#: replyto.php:793 +#: replyto.php:784 msgid "Order confirmations, shipping notifications, invoices, customer notes." msgstr "" -#: replyto.php:807 +#: replyto.php:798 msgid "Configure different Reply-To addresses based on the type of email being sent. Each context can have its own email address and display name." msgstr "" -#: replyto.php:845 +#: replyto.php:836 msgid "Active with email configured" msgstr "" -#: replyto.php:846 +#: replyto.php:837 msgid "Inactive or no email configured" msgstr "" -#: replyto.php:862 +#: replyto.php:853 msgid "What this context covers:" msgstr "" -#: replyto.php:864 +#: replyto.php:855 msgid "Examples:" msgstr "" -#: replyto.php:875 +#: replyto.php:866 msgid "Enable this context" msgstr "" -#: replyto.php:878 +#: replyto.php:869 msgid "When disabled, emails in this context will use the Default Reply-To address." msgstr "" -#: replyto.php:888 +#: replyto.php:879 msgid "Reply-To Email Address" msgstr "" -#: replyto.php:898 +#: replyto.php:889 msgid "Enter the email address where replies should be sent." msgstr "" -#: replyto.php:905 +#: replyto.php:896 msgid "Reply-To Display Name (Optional)" msgstr "" -#: replyto.php:915 +#: replyto.php:906 msgid "Optional: Enter a name to display with the email (e.g., \"Support Team\")." msgstr "" -#: replyto.php:924 +#: replyto.php:915 msgid "Note:" msgstr "" -#: replyto.php:925 +#: replyto.php:916 msgid "The Default context is always active and acts as a fallback for all emails." msgstr "" -#: replyto.php:935 +#: replyto.php:926 msgid "Delete plugin data on uninstall" msgstr "" -#: replyto.php:938 +#: replyto.php:929 msgid "Your Reply-To settings are preserved by default. Check this box to remove all plugin data when the plugin is uninstalled." msgstr "" -#: replyto.php:967 +#: replyto.php:958 msgid "Save Settings" msgstr "" diff --git a/readme.txt b/readme.txt index 3057921..e0e07ca 100644 --- a/readme.txt +++ b/readme.txt @@ -2,10 +2,10 @@ Contributors: robotstxt, javiercasares Tags: email, reply-to, mail, smtp Requires at least: 4.7 -Tested up to: 7.1 -Stable tag: 2.1.0 +Tested up to: 7.2 +Stable tag: 2.1.2 Requires PHP: 5.6 -Version: 2.1.0 +Version: 2.1.2 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.txt @@ -56,11 +56,71 @@ Yes. Each site in a Multisite network maintains its own configuration. On uninst == Compatibility == -* WordPress: 4.7 - 7.1 -* PHP: 5.6 - 8.5 +* WordPress: 4.7 - 7.2 +* PHP: 5.6 - 8.6 == Changelog == += 2.1.2 = + +_Release date: 2026-11-03_ + +**Highlights** + +* Legacy v1 options no longer wiped on save, and WordPress 7.2 / PHP 8.6 compatibility declared and verified. + +**Fixed** + +* Legacy v1.0.x Reply-To options (wp_mail_replyto_email, wp_mail_replyto_name) were emptied on every settings save, destroying the rollback/migration fallback values; on PHP 8.1+ hosts the same code path logged a sanitize_email() deprecation (found in debug.log review). The options are no longer part of the Settings API group, so their values survive every save. + +**Changed** + +* Development tooling updated via composer update (PHPStan 2.2.14 → 2.3.5, wp-compat 2.0.1 → 3.0.1, wordpress-stubs 7.1.0 → 7.1.2, PHPUnit 9.6.36 → 9.6.38). +* PHPCompatibility 9.3.5 → 10.0.0-alpha2 (dev-only): the 9.x line cannot see PHP 8.x syntax, 10.x scans through 8.6 for real. + +**Compatibility** + +* WordPress: 4.7 - 7.2 (Tested up to raised to 7.2 after smoke tests on WordPress 7.2-beta4 single-site staging: settings render, save, and wp_mail Reply-To injection verified) +* PHP: 5.6 - 8.6 (PHPCompatibility scan 5.6-8.6 clean; runtime verified on PHP 7.4, 8.2, 8.3, 8.4, 8.5, and 8.6.0RC3; syntax lint passes on every PHP binary 5.6 through 8.6) + +**Tests** + +* PHP Coding Standards: 3.13.6 +* WordPress Coding Standards: 3.4.1 +* PHPCompatibility: 10.0.0-alpha2 (range 5.6-8.6) +* PHPStan: 2.3.5 (level 9, wp-compat 3.0.1 enforcing the WordPress 4.7 floor) +* PHPUnit: 9.6.38 (87 tests) +* Plugin Check (PCP): 0 errors on the release package (4 accepted warnings, unchanged) + += 2.1.1 = + +_Release date: 2026-09-18_ + +**Highlights** + +* Security hardening patch: settings error messages now escape the context label, and the deferred review items are closed out. No behavior change. + +**Security** + +* Context name in settings error/warning messages now escaped at output time (defense in depth for translated labels). + +**Changed** + +* Known-issues triage closed: load_plugin_textdomain() accepted (bundled translations must load), trademarked_term accepted (not a problem), switch_to_blog() uninstall sweep confirmed as the standard pattern (batched get_sites() documented as the fallback for very large networks). +* composer update re-run: no dependency changes (already current). + +**Compatibility** + +* WordPress: 4.7 - 7.1 (7.2 not yet released — expected December 2026 — so Tested up to stays at 7.1) +* PHP: 5.6 - 8.5 + +**Tests** + +* PHP Coding Standards: 3.13.6 +* WordPress Coding Standards: 3.4.1 +* PHPStan: 2.2.14 (level 9) +* PHPUnit: 9.6.36 + = 2.1.0 = _Release date: 2026-09-18_ @@ -97,85 +157,22 @@ _Release date: 2026-09-18_ * PHPUnit: 9.6.36 * Plugin Check (PCP): 0 errors on the release package. -= 2.0.3 = - -_Release date: 2026-08-18_ - -**Highlights** - -* Housekeeping release: branding URLs moved to robotstxt.software and declared WordPress support floor set to 4.7. - -**Changed** - -* Minimum WordPress version raised from 3.6 to 4.7 (real functional floor: register_setting() with array arguments requires WordPress 4.7). -* Developer URL updated to https://www.robotstxt.software/ and plugin home page added (https://www.robotstxt.software/plugins/replyto/). -* Full changelog now hosted at https://www.robotstxt.software/plugins/replyto/changelog/. -* Development tooling updated (PHPCS, WPCS, PHPStan, PHPUnit). - -**Added** - -* bin/preflight.sh automated pre-deploy verification script. -* WordPress floor verification (wp-compat) integrated into PHPStan analysis. - -**Compatibility** - -* WordPress: 4.7 - 7.1 -* PHP: 5.6 - 8.5 - -**Tests** - -* PHP Coding Standards: 3.13.6 -* WordPress Coding Standards: 3.4.1 -* PHPStan: 2.2.8 (level 9) -* PHPUnit: 9.6.36 - -= 2.0.2 = - -_Release date: 2026-06-05_ - -**Highlights** - -* Translations added for Spanish (Spain) and Catalan. -* WordPress minimum version corrected to 3.6 based on actual function usage (wp-compat analysis). - -**Changed** - -* Minimum WordPress version updated from 4.1 to 3.6. -* Tested up to WordPress 7.1. -* POT file regenerated via WP-CLI i18n. - -**Added** - -* Spanish (Spain) translation (es_ES). -* Catalan translation (ca). - -**Compatibility** - -* WordPress: 3.6 - 7.1 -* PHP: 5.6 - 8.5 - -**Tests** - -* PHP Coding Standards: 3.13.5 -* WordPress Coding Standards: 3.3.0 -* PHPStan: 2.2.2 (level 9) -* PHPUnit: 9.6.34 - = Previous versions = If you want to see the full changelog, visit the [changelog](https://www.robotstxt.software/plugins/replyto/changelog/) page. == Upgrade Notice == += 2.1.2 = + +Legacy v1 settings are no longer wiped on save; tested with WordPress 7.2 and PHP 8.6. Recommended for everyone. + += 2.1.1 = +Security hardening patch: settings messages escape the context label. No behavior change; upgrade optional. + = 2.1.0 = WooCommerce context values are preserved and plugin data is kept on uninstall unless you opt in. Recommended for all users. -= 2.0.3 = -Housekeeping release: branding URLs moved to robotstxt.software. Minimum WordPress version is now 4.7. - -= 2.0.2 = -Translations added for Spanish (Spain) and Catalan. WordPress minimum corrected to 3.6. Upgrade recommended. - == Compliance == This plugin adheres to the following security measures and review protocols for each version: diff --git a/replyto.php b/replyto.php index 1126fa8..323631e 100644 --- a/replyto.php +++ b/replyto.php @@ -5,7 +5,7 @@ * Plugin URI: https://www.robotstxt.software/plugins/replyto/ * Requires at least: 4.7 * Requires PHP: 5.6 - * Version: 2.1.0 + * Version: 2.1.2 * Author: ROBOTSTXT * Author URI: https://www.robotstxt.software/ * License: GPL-3.0-or-later @@ -15,7 +15,7 @@ * * @package replyto * - * @version 2.1.0 + * @version 2.1.2 */ defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); @@ -26,7 +26,7 @@ defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); * @since 2.1.0 */ if ( ! defined( 'WP_MAIL_REPLYTO_VERSION' ) ) { - define( 'WP_MAIL_REPLYTO_VERSION', '2.1.0' ); + define( 'WP_MAIL_REPLYTO_VERSION', '2.1.2' ); } register_activation_hook( __FILE__, 'wp_mail_replyto_migrate_to_v200' ); @@ -461,26 +461,12 @@ function wp_mail_replyto_register_settings() { ) ); - // Legacy settings kept for backward compatibility during migration. - register_setting( - 'wp_mail_replyto_settings_group', - 'wp_mail_replyto_email', - array( - 'type' => 'string', - 'sanitize_callback' => 'sanitize_email', - 'default' => '', - ) - ); - - register_setting( - 'wp_mail_replyto_settings_group', - 'wp_mail_replyto_name', - array( - 'type' => 'string', - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - ) - ); + // The legacy v1.0.x options (wp_mail_replyto_email, wp_mail_replyto_name) + // are intentionally NOT registered here: they are not part of the settings + // form, and options.php calls update_option() with null for every registered + // option missing from the POST body. That wiped the legacy values on every + // save and triggered a sanitize_email(null) deprecation on PHP 8.1+. The + // options are read directly during migration, which needs no registration. // Uninstall behaviour opt-in: data is preserved unless the user checks this. register_setting( @@ -579,7 +565,7 @@ function wp_mail_replyto_sanitize_contexts( $input ) { 'wp_mail_replyto_messages', 'wp_mail_replyto_invalid_email_' . $context_key, /* translators: %s: context name */ - sprintf( esc_html__( 'Invalid email address for %s context.', 'replyto' ), $context_label ), + sprintf( esc_html__( 'Invalid email address for %s context.', 'replyto' ), esc_html( $context_label ) ), 'error' ); $email = ''; @@ -595,7 +581,7 @@ function wp_mail_replyto_sanitize_contexts( $input ) { 'wp_mail_replyto_messages', 'wp_mail_replyto_domain_warning_' . $context_key, /* translators: %s: context name */ - sprintf( esc_html__( 'Warning: The email domain for %s context does not appear to have valid DNS records.', 'replyto' ), $context_label ), + sprintf( esc_html__( 'Warning: The email domain for %s context does not appear to have valid DNS records.', 'replyto' ), esc_html( $context_label ) ), 'warning' ); } @@ -610,7 +596,7 @@ function wp_mail_replyto_sanitize_contexts( $input ) { 'wp_mail_replyto_messages', 'wp_mail_replyto_name_long_' . $context_key, /* translators: %s: context name */ - sprintf( esc_html__( 'Name for %s context was truncated to 255 characters.', 'replyto' ), $context_label ), + sprintf( esc_html__( 'Name for %s context was truncated to 255 characters.', 'replyto' ), esc_html( $context_label ) ), 'warning' ); } @@ -620,7 +606,7 @@ function wp_mail_replyto_sanitize_contexts( $input ) { 'wp_mail_replyto_messages', 'wp_mail_replyto_name_long_' . $context_key, /* translators: %s: context name */ - sprintf( esc_html__( 'Name for %s context was truncated to 255 characters.', 'replyto' ), $context_label ), + sprintf( esc_html__( 'Name for %s context was truncated to 255 characters.', 'replyto' ), esc_html( $context_label ) ), 'warning' ); }