Skip to content

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

Closed

Description

@Afloat16

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.

Reproduction

At master 541cf26, log a synthetic localhost URL with an arbitrary username/password, query and fragment using logHostEvent, then inspect its file. HTTP localhost, WS IPv4 loopback and SOCKS5 IPv6 loopback variants reproduce the omission: 26 passed / 4 failed on the base. Fixtures contain no real credentials.

Expected

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.

Prior work

Screened all 3,221 cached upstream PRs. #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. Previous Afloat16 PRs #6046–#6055 are excluded.

Activity

  1. ranxianglei commented on Nov 12, 2026

    @ranxianglei
    Owner

    Fixed in batch PR #6439 (merged).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions