Repository navigation
com_tools: set the weber-auth cookie when the launch interstitial con… - #1970
Merged
nkissebe merged 1 commit intoNov 4, 2026
Merged
Conversation
…nects
Jupyter (weber) tools launched through the async interstitial were refused
by the proxy. The interstitial gets redirect_url from GET /api/tools/{sess}
(readTask), which runs the middleware "view" command but never set the
weber-auth cookie from its weber_auth value -- only the site session viewer
(viewTask) did. The browser therefore reached the proxy without the cookie.
Opening the same session from the dashboard worked because that goes
through viewTask.
Move the cookie code into Utils::setWeberAuthCookie() and call it from both
viewTask and readTask. It uses Request::root() instead of Request::base()
for the cookie domain; they are identical on the site, and root() drops a
trailing /api so the domain stays the bare host when called from the API.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Jupyter (weber) tools launched through the new async launch interstitial are refused by the weber proxy. Opening the same running session from the dashboard works.
The interstitial gets
redirect_urlfromGET /api/tools/{sess}(Sessionsv1_0::readTask). That runs the middlewareviewcommand and returnsweber_authin the JSON, but never sets theweber-auth-<domain>cookie. Only the site session viewer (Sessions::viewTask) set it, so the browser reached the proxy without the cookie. The dashboard link goes throughviewTask, which is why it worked there.Fix
Utils::setWeberAuthCookie($output).viewTask(no change in behavior) and fromreadTask(the fix). The interstitial's XHR is same-origin, so the browser stores the cookie before it is sent on toredirect_url.Request::root()instead ofRequest::base(). On the site they are the same.root()drops a trailing/api, so the domain stays the bare host when the helper is called from the API.Testing
php -lpasses on all three files (php:8.2-cli)./api/tools/<sess>response should carrySet-Cookie: weber-auth-<host>=…, and the redirect should open Jupyter without going through the dashboard.🤖 Generated with Claude Code