[pve-devel] [PATCH manager] ui: properly reset API 401 count

Fiona Ebner f.ebner at proxmox.com
Wed Oct 29 12:39:57 CET 2025


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 at proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner at 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
>      },




More information about the pve-devel mailing list