KamoCRM

Clear the cloned session in the enter-as tab

Fixkamo-internal
Ya
24 Agosti 2026, 23:23 UTC
Mwandishi
kamo
Ahadi ya
3db6129

Entering an org opens a tab with window.open('', '_blank') and points it at /validate. That was cross-origin until now, so nothing was shared. It is same-origin for an org without a custom domain, and a same-origin window.open CLONES the opener's sessionStorage -- which is where the session id lives. The new tab therefore starts out holding the session for the org being LEFT. /validate overwrites it a moment later, so the window is short. It is not zero: if the one-time key has expired or the navigation fails, that tab keeps acting as the source org while presenting itself as the destination. Clearing first makes the worst case a tab with no session, which reads as signed out rather than as somebody else. Wrapped in a try: a custom-domain workspace opens cross-origin, where touching the new tab's storage throws and nothing was cloned anyway. 2880 tests pass. The 2 that fail locally are a rights-hierarchy parity check reading RoleRightType.java from the sibling Java repo, which has uncommitted edits from another session; the test is skipIf(!available) and CI checks out this repo alone, so it skips there.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila kitu kinaingia kwenye tovuti yako mwenyewe. Anza kwenye mpango wa bure na usome ukurasa huu tena katika mwezi mmoja.

Kuwa Huru MileleMtazamo wa bei