* [pve-devel] [PATCH manager] ui: properly reset API 401 count
@ 2025-04-18 6:34 Dominik Csapak
2025-10-29 11:39 ` Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-04-18 6:34 UTC (permalink / raw)
To: pve-devel
due to a timing race condition, it can happen that we try to increase
the 401 count before resetting it (which happens after the first
ticket api call). Since `undefined + ` === NaN, our later check for
`> 5` never triggers and we don't show the login mask, but an empty
window.
To fix this, initialize the variable always with 0.
Observed when restoring a session after a ticket expired while the
browser was closed.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/Workspace.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 922e01df..ca668caa 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -13,6 +13,8 @@ Ext.define('PVE.Workspace', {
loginData: null, // Data from last login call
+ response401count: 0,
+
onLogin: function(loginData) {
// override me
},
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pve-devel] [PATCH manager] ui: properly reset API 401 count
2025-04-18 6:34 [pve-devel] [PATCH manager] ui: properly reset API 401 count Dominik Csapak
@ 2025-10-29 11:39 ` Fiona Ebner
0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-10-29 11:39 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
I guess this is still relevant?
Am 18.04.25 um 8:34 AM schrieb Dominik Csapak:
> due to a timing race condition, it can happen that we try to increase
> the 401 count before resetting it (which happens after the first
> ticket api call). Since `undefined + ` === NaN, our later check for
> `> 5` never triggers and we don't show the login mask, but an empty
> window.
>
> To fix this, initialize the variable always with 0.
>
> Observed when restoring a session after a ticket expired while the
> browser was closed.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
But it needs a rebase.
> ---
> www/manager6/Workspace.js | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
> index 922e01df..ca668caa 100644
> --- a/www/manager6/Workspace.js
> +++ b/www/manager6/Workspace.js
> @@ -13,6 +13,8 @@ Ext.define('PVE.Workspace', {
>
> loginData: null, // Data from last login call
>
> + response401count: 0,
> +
> onLogin: function(loginData) {
> // override me
> },
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-29 11:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-18 6:34 [pve-devel] [PATCH manager] ui: properly reset API 401 count Dominik Csapak
2025-10-29 11:39 ` Fiona Ebner
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.