]> mop.ddnsfree.com - git repositories - brisk.git/commit
whoever is displaced by another access goes back to the login
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:39:37 +0000 (12:39 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:39:37 +0000 (12:39 +0200)
commitd13caa171f3c15dc82d7b9f3c3b7a5238b1a4a91
treed42895830bd267a4d59257b4a3ade63fdbe1cb86
parentfba4dcbd52cf4dadf418950111b0f8d95aeec960
whoever is displaced by another access goes back to the login

The farewell added a moment ago stopped the stream and showed a notice, the
same in every case. But the cases are two, and they want two different
answers.

If the two windows share the SAME session, it cannot be sent to the login:
the session cookie is shared between the tabs of the same browser, so
index.php would let it straight back in and the bouncing would start again.
It was checked that deleting the cookie from the displaced window would not
be enough either: the daemon reads the session ONLY from there (a stream with
sess in the url but no cookie is refused), so deleting it would disarm the
winning window as well, since the cookie is shared. For this case the notice
without a return to the login stays.

If instead the old stream belonged to another session - the "ghost swap" of
add_user(), that is a new access with the same name from another browser -
its session is orphaned by now and it must go back to the login: there
ghost_sess shows it "La tua sessione e' stata assegnata ad un altro browser"
and it does not come back in, because that session is no longer valid.

To tell them apart, the session the stream was opened with is recorded in
rd_sess, and when it is replaced that is compared with the one of the
newcomer.

Checked in both cases: same session -> xstm.stop() and the notice, no return
to the login; different session -> xstm.stop() and a return to index.php,
where the message really shows up. A complete game confirms it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE
web/Obj/brisk.phh
web/Obj/user.phh
web/briskin5/Obj/briskin5.phh