Repository navigation
fix(web-shell): preserve token and base path in session URLs #7926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cf4826b
fix(web-shell): preserve session URL context
ca58b2e
fix(web-shell): keep daemon token out of the session URL (#7926)
qwen-code-dev-bot eb117ca
Merge branch 'main' into fix/web-shell-session-url
qwen-code-dev-bot 0536742
Merge branch 'main' into fix/web-shell-session-url
qwen-code-dev-bot 352fd88
Merge branch 'main' into fix/web-shell-session-url
wenshao 16c8daf
fix(web-shell): anchor session URL parser to agree with writer (#7926)
qwen-code-dev-bot 02a08ee
test(web-shell): cover parseSessionId malformed-encoding catch branch…
qwen-code-dev-bot 6b9f7f7
fix(web-shell): preserve base path in split-view URL (#7926)
qwen-code-dev-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] The PR title, description, Reviewer Test Plan, and risk note are stale after commit
ca58b2eac— they still claim the token "remains in the URL" (title: "preserve token and base path"; test plan: "confirm the token remains in the URL"; After example:/web-shell/session/new#token=secret; risk: "The token intentionally remains visible in the browser address bar and history"), but the code strips it again (removeDaemonTokenFromUrl()at startup andurl.searchParams.delete('token')on every session-URL rewrite, both in non-DEV), so the net change is now only the base-path fix — Failure scenario: a reviewer follows the documented test plan in a production build, opens the shell with?token=, switches sessions, and observes the token being stripped, contradicting the title, test plan, After-evidence, and the stated security tradeoff.Suggested fix: update the PR title and description to drop the token-retention claims and reframe the PR as the base-path preservation fix (remove the token-related verification steps, the After example with
#token=, and the token-visibility risk note).中文说明
[Suggestion] PR 标题、描述、Reviewer Test Plan 和风险说明在提交
ca58b2eac之后已经过时——它们仍声称 token 会“保留在 URL 中”(标题:“preserve token and base path”;测试计划:“confirm the token remains in the URL”;修改后示例:/web-shell/session/new#token=secret;风险:“The token intentionally remains visible in the browser address bar and history”),但代码已恢复移除 token 的逻辑(启动时调用removeDaemonTokenFromUrl(),每次会话 URL 重写时执行url.searchParams.delete('token'),均在非 DEV 下),因此当前净改动只剩基础路径保留修复——失败场景:评审者按照文档中的测试计划在生产构建中用?token=打开 Web Shell 并切换会话,观察到 token 被移除,与标题、测试计划、修改后示例以及所述安全取舍相矛盾。建议修复:更新 PR 标题和描述,去掉 token 保留相关的表述,将 PR 重新定位为基础路径保留修复(删除 token 相关的验证步骤、带
#token=的修改后示例以及 token 可见性的风险说明)。— kimi-k3 via Qwen Code /review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed — the PR text is stale. After
ca58b2eacthe net change is the base-path preservation fix; the token is still stripped (removeDaemonTokenFromUrl()at startup andsearchParams.delete('token')on every session-URL rewrite, both in non-DEV), so the title, test plan, After example, and token-visibility risk note no longer match the code.I have no GitHub credentials and cannot edit the PR title/body from here — the workflow owns network writes. I have written a corrected, reframed
pr-title.txt(fix(web-shell): preserve deployment base path in standalone session URLs) andpr-body.md(base-path fix; token handling described as unchanged, with the token-retention verification steps and risk note removed) to the workdir for the workflow/maintainer to apply. Leaving this thread open because I cannot verify the PR text was actually updated.中文说明
同意——PR 文本确实已过时。在
ca58b2eac之后,净改动是基础路径保留修复;token 仍会被移除(启动时调用removeDaemonTokenFromUrl(),每次会话 URL 重写时执行searchParams.delete('token'),均在非 DEV 下),因此标题、测试计划、修改后示例以及 token 可见性的风险说明已不再与代码相符。我没有 GitHub 凭据,无法在此处编辑 PR 标题/正文——网络写入由工作流负责。我已将更正后、重新定位的
pr-title.txt(fix(web-shell): preserve deployment base path in standalone session URLs)和pr-body.md(基础路径修复;将 token 处理描述为未改动,并删除了 token 保留相关的验证步骤和风险说明)写入工作目录,供工作流/维护者应用。该线程保持打开,因为我无法验证 PR 文本是否确实被更新。