mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-26 23:49:33 +01:00
fix(webview): the review items of #825
The owner of a managed dsh tab is compared with the server's starter only in multi-user mode: a record created there keeps its owner, while a single-user start records none, so that tab would never get its cookie again (new route test). CLAUDE.md and the invariants doc name the cookie rules. The third item, Codeman's session cookie filtered on the WebSocket leg whether or not the dsh cookie is injected, came in with the merge itself, where it met #827. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9d0f29fb22
commit
acd90efe73
4 files changed
+25
-3
No files matched your search
@@ -470,8 +470,10 @@ async function managedDashboardCookie(webview: Webview, upstream: URL): Promise<
|
||||
const port = Number(upstream.port || (upstream.protocol === 'https:' ? 443 : 80));
|
||||
// The second identity check is the supervisor's: even an entitled owner gets
|
||||
// nothing from a process another user started (POST restarts it for a new
|
||||
// starter, so that tab simply reopens with its own cookie).
|
||||
return getDeepSeekWebCookie(port, webview.owner) ?? undefined;
|
||||
// starter, so that tab simply reopens with its own cookie). Only in multi-user
|
||||
// mode: a record created there keeps its owner, while a single-user start has
|
||||
// no starter, so comparing that owner would refuse the tab for good.
|
||||
return getDeepSeekWebCookie(port, isMultiUserMode() ? webview.owner : undefined) ?? undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user