Skip to content

[PR] fix: strip credentials from loopback diagnostic URLs - #6098

Closed
Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-10_loopback-log-secrets
Closed

Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-10_loopback-log-secrets

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Problem

maskUrlForDiagnostics returns entire localhost/loopback URLs unchanged. That exemption retains userinfo, query parameters and fragments. Generic text redaction cannot recognize arbitrary passwords or every query key, so the host-event sink can write these bytes to the shared paste-able bili.log.

Changes

Keep the local host, port and path visible while removing userinfo/query/hash. Preserve clean pathless local origins byte-for-byte. Disabling host masking still does not disable credential removal.

Validation

  • Before: tests/log-mask.test.ts — 26 passed, 4 failed.
  • After: 30 passed, 0 failed, including actual logHostEvent file output and clean-origin/host-opt-out controls.
  • npm run typecheck — passed.
  • npm run build — passed.
  • Published fork tree 45a5d1b6669a514e7382a1cb5bb863983f8dcc08 exactly matches tested local commit c5dd22cfa79e933c9c16859db6f8729c0a55641d.

The full remote-suite verdict belongs to CI. #1719 adds generic secret/IP scrubbing; #3653 adds the loopback exemption and #4402 expands supported URL schemes. This fixes the remaining arbitrary URL secrets inside that exemption. All 3,221 historical PRs were screened; independent of #6046–#6055.

Closes #6097

@ranxianglei ranxianglei changed the title fix: strip credentials from loopback diagnostic URLs [PR] fix: strip credentials from loopback diagnostic URLs Nov 10, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

Landed via batch PR #6439 (merged) — closing as superseded.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 重复 — 本 PR 的修复已随 batch PR #6439 合入 master,确认 superseded。

Verified against origin/master:

  • [PR] chore(batch): land 50 open Afloat16 fixes in one history-preserving batch #6439's merge commit (873715d) IS an ancestor of origin/master.
  • It carries commit 9664b82 fix: strip credentials from loopback diagnostic URLs (cherry-picked from Afloat's 866f496), which implements exactly this PR's proposal in src/log-mask.ts maskUrlForDiagnostics: loopback URLs keep host/port/path but userinfo/query/hash are stripped (if (!u.username && !u.password && !u.search && !u.hash) return url; return \${u.protocol}//${u.host}${u.pathname}`), and clean pathless local origins stay byte-for-byte verbatim. Tests added in tests/log-mask.test.ts`.

Nothing left to do here. Per policy I don't close issues — the close is yours.

@ranxianglei ranxianglei reopened this Nov 14, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Re-verified live — nothing changed since the prior confirmation (floor 3):

No work remains on this thread. The thread is still open on the mirror — the close is yours per policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loopback URL diagnostics keep inline credentials and query secrets in bili.log

2 participants