From 79294626804dbf606c4c0f746739612dc429f0cc Mon Sep 17 00:00:00 2001 From: Javier Casares Date: Sat, 7 Feb 2026 10:11:58 +0000 Subject: [PATCH] v2.0.1 --- changelog.txt | 4 ++++ includes/class-settings-page.php | 5 +++++ readme.txt | 4 ++-- robotstxt-smtp.php | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9f5bd82..27aa4a3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ += 2.0.1 = + +* Fixed automatic password clearing when both host and username fields are empty to prevent orphaned credentials. + = 2.0.0 = * Comprehensive security audit and hardening. diff --git a/includes/class-settings-page.php b/includes/class-settings-page.php index f1b0daa..6ebc496 100644 --- a/includes/class-settings-page.php +++ b/includes/class-settings-page.php @@ -3871,6 +3871,11 @@ class Settings_Page { $clean['reply_to_name'] = sanitize_text_field( $options['reply_to_name'] ); } + + // Clear password if both host and username are empty. + if ( empty( $clean['host'] ) && empty( $clean['username'] ) ) { + $clean['password'] = ''; + } // Only process Amazon SES fields if Amazon SES integration is NOT active (the add-on will handle it). if ( ! Plugin::is_amazon_ses_integration_active() ) { if ( isset( $options['amazon_ses_access_key'] ) ) { diff --git a/readme.txt b/readme.txt index b119e12..282aaea 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: javiercasares Tags: smtp, email, mail Requires at least: 6.5 Tested up to: 6.9 -Stable tag: 2.0.0 +Stable tag: 2.0.1 Requires PHP: 8.2 -Version: 2.0.0 +Version: 2.0.1 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/robotstxt-smtp.php b/robotstxt-smtp.php index f24c024..2cf0910 100644 --- a/robotstxt-smtp.php +++ b/robotstxt-smtp.php @@ -3,7 +3,7 @@ * Plugin Name: SMTP (by ROBOTSTXT) * Plugin URI: https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp * Description: Configure WordPress to send emails through SMTP with detailed controls. - * Version: 2.0.0 + * Version: 2.0.1 * Requires at least: 6.5 * Requires PHP: 8.2 * Network: true @@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { } if ( ! defined( 'ROBOTSTXT_SMTP_VERSION' ) ) { - define( 'ROBOTSTXT_SMTP_VERSION', '2.0.0' ); + define( 'ROBOTSTXT_SMTP_VERSION', '2.0.1' ); } if ( ! defined( 'ROBOTSTXT_SMTP_FILE' ) ) {