From: "Michael Köppl" <m.koeppl@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Lukas Wagner <l.wagner@proxmox.com>
Subject: Re: [pve-devel] [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium
Date: Tue, 8 Jul 2025 19:15:37 +0200 [thread overview]
Message-ID: <4e9c8058-7e7e-4df9-9bdf-4582e9e88c54@proxmox.com> (raw)
In-Reply-To: <20250627121339.182283-1-l.wagner@proxmox.com>
Tested this on the latest master with both Chromium 137.0.7151.68 and
Firefox 139.0.1. Was able to reproduce the original issue #5588 on PBS
in Chromium before applying the patches.
Ensured that:
- the "Authenticate" checkbox stays unchecked in Chromium
- "Unchanged" is only shown as the empty text *with* authentication
activated
- the password field is actually empty upon creation of a new SMTP
target, instead of showing "Unchanged"
Did not notice anything off. The implementation looks good to me. I
spent a few minutes tinkering around with an alternative approach of
detecting whether the user had previously entered a password, but the
approach in 2/3 is works as expected and doesn't add unnecessary complexity.
Consider this:
Tested-by: Michael Köppl <m.koeppl@proxmox.com>
Reviewed-by: Michael Köppl <m.koeppl@proxmox.com>
On 6/27/25 14:13, Lukas Wagner wrote:
> When editing an SMTP endpoint that has no authentication settings, in
> Chromium-based browsers, the 'Authenticate' checkbox was ticked because
> of a race condition between the view-model default and the InputPanel
> logic setting the existing values for the endpoint. Explicitly setting
> the value in the view model in onSetValues seems to fix this reliably.
>
> Tested on:
> - Firefox 140
> - Chromium 137
> - Chrome 138
> - Gnome Web (Webkit-based) 48
>
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
> src/panel/SmtpEditPanel.js | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/panel/SmtpEditPanel.js b/src/panel/SmtpEditPanel.js
> index df6e3b7..fd10b54 100644
> --- a/src/panel/SmtpEditPanel.js
> +++ b/src/panel/SmtpEditPanel.js
> @@ -196,10 +196,17 @@ Ext.define('Proxmox.panel.SmtpEditPanel', {
> },
>
> onSetValues: function (values) {
> + let me = this;
> +
> values.authentication = !!values.username;
> values.enable = !values.disable;
> delete values.disable;
>
> + // Fix race condition in chromium-based browsers. Without this, the
> + // 'Authenticate' remains ticked (the default value) if loading an
> + // SMTP target without authentication.
> + me.getViewModel().set('authentication', values.authentication);
> +
> return values;
> },
> });
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-08 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 12:13 Lukas Wagner
2025-06-27 12:13 ` [pve-devel] [PATCH proxmox-widget-toolkit 2/3] notification: smtp: only show 'Unchanged' in password field when it makes sense Lukas Wagner
2025-06-27 12:13 ` [pve-devel] [PATCH proxmox-widget-toolkit 3/3] notification: smtp: don't split translatable string Lukas Wagner
2025-06-27 12:22 ` Maximiliano Sandoval
2025-07-08 17:15 ` Michael Köppl [this message]
2025-07-15 22:34 ` [pve-devel] applied: [PATCH proxmox-widget-toolkit 1/3] fix #5588: notification: smtp: fix 'Authenticate' checkbox in Chromium Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e9c8058-7e7e-4df9-9bdf-4582e9e88c54@proxmox.com \
--to=m.koeppl@proxmox.com \
--cc=l.wagner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.