the calling code did require that authOK returns the cookie if
there is a valid one
make it now very explicit that the cookie gets returned instead
of using implicit short-circuit behaviour
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
return undefined;
}
let cookie = Ext.util.Cookies.get(Proxmox.Setup.auth_cookie_name);
- return (Proxmox.UserName !== '') && (cookie && !cookie.startsWith("PVE:tfa!"));
+ if (Proxmox.UserName !== '' && cookie && !cookie.startsWith("PVE:tfa!")) {
+ return cookie;
+ } else {
+ return false;
+ }
},
authClear: function() {