fix(builder): a crash report takes a name out of a file URL too #3184

Closed
PedroRossi wants to merge 2 commits from PedroRossi/Longshot:fix/redact-url-percent into main
Contributor

Summary

Crash reports can still carry a Windows or Linux player's folder name when a line holds it as a file URL. Who::redact
(builder/crates/crash/src/redact.rs) takes the home folder and the user name out of every report line, matching them as
written. Drivers and the Vulkan loader sometimes write a path as a file:// URL, where a space becomes %20 and a
non-ASCII letter becomes %XX, so a folder like John Doe (file:///C:/Users/John%20Doe/…) or josé
(file:///home/jos%C3%A9/…) is not matched and stays in the report — which, for the manual report, is meant for public
issues.

line_bytes now also matches the user-or-folder name in its URL form: url_form builds the percent-encoded variant (a
space as %20, a non-ASCII byte as %XX, separators and the rest unchanged), and the pass that matches a name after a
path separator tries it too. The plain match and the home-folder rule are unchanged, so no new false matches.

This is the focused follow-up to #3035 (closed): main's redaction rework already took the 8.3 short-name case (it reads
the real short name from the OS), leaving only this file-URL gap.

Read first: url_form and its use in the user branch of line_bytes.

Testing

Tested: on this PC (Debian 13), game-free: the new test
(a_name_in_a_file_url_is_taken_out_though_it_is_percent_encoded) fails on main, the name left in the URL, and passes
here; the crash crate's 28 tests, clippy -D warnings, rustfmt. mise run test on this branch: 832 passed, 56 failed, 13
skipped — 45 of the 56 are checks that need a tool this PC lacks on PATH under --strict (clang, clang++, spirv-val,
glslang), the rest are GPU/compile fixtures already failing on main (test_cloth_kernels, test_mesh_first_types,
test_dead_targets_sweep, …); none touch the crash crate. This change is report-time redaction and does not run in the
game, so it was not run in-game (--force).

Still to test:

  • Windows, by hand: from an account whose folder has a space or a non-ASCII letter, make a manual crash report whose log
    holds a file:// URL, and confirm the name is absent (needs a real driver/loader line and a look by eye)

Measurements

Nothing to measure: report-time redaction, a few more byte comparisons per line; nothing a build or the game runs changes.

Risks

The URL form is matched only where the plain name already would be — a whole path component after a separator — so a line
that merely contains %20 elsewhere is not touched. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

Found in an AI-assisted audit of the repository. The test, the fix and this description were made with Claude Code; I
reviewed them.

Co-Authored-By: Claude Opus 5.5 [email protected]

🤖 Generated with Claude Code

## Summary Crash reports can still carry a Windows or Linux player's folder name when a line holds it as a **file URL**. `Who::redact` (`builder/crates/crash/src/redact.rs`) takes the home folder and the user name out of every report line, matching them as written. Drivers and the Vulkan loader sometimes write a path as a `file://` URL, where a space becomes `%20` and a non-ASCII letter becomes `%XX`, so a folder like `John Doe` (`file:///C:/Users/John%20Doe/…`) or `josé` (`file:///home/jos%C3%A9/…`) is not matched and stays in the report — which, for the manual report, is meant for public issues. `line_bytes` now also matches the user-or-folder name in its URL form: `url_form` builds the percent-encoded variant (a space as `%20`, a non-ASCII byte as `%XX`, separators and the rest unchanged), and the pass that matches a name after a path separator tries it too. The plain match and the home-folder rule are unchanged, so no new false matches. This is the focused follow-up to #3035 (closed): `main`'s redaction rework already took the 8.3 short-name case (it reads the real short name from the OS), leaving only this file-URL gap. Read first: `url_form` and its use in the user branch of `line_bytes`. ## Testing **Tested:** on this PC (Debian 13), game-free: the new test (`a_name_in_a_file_url_is_taken_out_though_it_is_percent_encoded`) fails on `main`, the name left in the URL, and passes here; the crash crate's 28 tests, clippy -D warnings, rustfmt. `mise run test` on this branch: 832 passed, 56 failed, 13 skipped — 45 of the 56 are checks that need a tool this PC lacks on PATH under `--strict` (clang, clang++, spirv-val, glslang), the rest are GPU/compile fixtures already failing on `main` (`test_cloth_kernels`, `test_mesh_first_types`, `test_dead_targets_sweep`, …); none touch the crash crate. This change is report-time redaction and does not run in the game, so it was not run in-game (`--force`). **Still to test:** - Windows, by hand: from an account whose folder has a space or a non-ASCII letter, make a manual crash report whose log holds a `file://` URL, and confirm the name is absent (needs a real driver/loader line and a look by eye) ## Measurements Nothing to measure: report-time redaction, a few more byte comparisons per line; nothing a build or the game runs changes. ## Risks The URL form is matched only where the plain name already would be — a whole path component after a separator — so a line that merely contains `%20` elsewhere is not touched. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. --- Found in an AI-assisted audit of the repository. The test, the fix and this description were made with Claude Code; I reviewed them. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Who::redact takes the home folder and user name out of report lines, matching them as written. A file URL from a
driver or the Vulkan loader writes a space as %20 and a non-ASCII letter as %XX, so a folder like "John Doe" or
"josé" stays in a public report. Fails on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): a crash report takes a name out of a file URL too
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
fc2fcc563e
line_bytes now also matches the user-or-folder name in its file-URL form (url_form: a space as %20, a non-ASCII byte
as %XX), in the pass that matches a name after a path separator, so a loader or driver line like
file:///C:/Users/John%20Doe/ no longer leaves the folder name in the report. The plain match is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PedroRossi changed title from WIP: fix(builder): a crash report takes a name out of a file URL too to fix(builder): a crash report takes a name out of a file URL too 2026-12-04 16:43:55 +00:00
Owner
@review
BeanBot requested changes 2026-12-04 17:46:06 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The fix handles the two tested URL forms, but other valid file URLs can still expose a player's folder name, including when the account name is a prefix of the folder name. The new matching can also redact part of an unrelated URL component.

Adds percent-encoded name matching to report and log redaction. It covers the supplied examples but needs URL-aware matching and component boundaries to protect names reliably without altering unrelated paths.

Blocking (2): must change before merging.

  1. L1 builder/crates/crash/src/redact.rs:82: The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. (more on the line) Do: Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name.
  2. L2 builder/crates/crash/src/redact.rs:33: The generated spelling does not cover valid file URL encodings. (more on the line) Do: Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms.

Should fix (1): not blocking, but worth doing before merging.

  • L3 builder/crates/crash/src/redact.rs:86: A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. (more on the line) Do: Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 builder/crates/crash/src/redact.rs:82: The Windows manual report check listed as still to test has not been reported. (more on the line) Do: Run the listed Windows manual report check and confirm the name is absent.

@fix can do L1, L2 and L3.

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the two supplied examples: the author reports that the new test fails on main and passes on this branch. Coverage of other valid URL encodings and overlapping account and folder names is incomplete.

Other systems: Who::redact and redact_bytes also serve builder logs and diagnostic reports, so the matching changes apply beyond manual crash reports. The code uses the same byte matching on Linux and Windows, with Windows-specific case handling; the reported test covers simulated Windows rules on Debian, not a Windows run.

Switches: None.

Reviewed: fc2fcc563e against b77c2f4b3e: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, both commits, the complete diff and redact.rs in full; inspected redaction callers and the fix-with-test rules. docs/review-checklist.md and ../Tooling/AGENTS.md were not present. No recorded runs, translations or generated files changed.; nothing run (a code review).

Checked and fine:

  • The new test exercises the redaction behavior and the author reports it fails on main and passes on the branch.
  • Both commits record AI assistance; no game-derived or generated files are changed.
  • No switch, renderer API, shader, dependency or third-party file changes.

Testing: Read-only review; no code or tests were run. The author reports 28 crash-crate tests passing on Debian and CI is still running.

Overlaps and merge order: No overlapping pull requests found in the supplied context; the network was unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The fix handles the two tested URL forms, but other valid file URLs can still expose a player's folder name, including when the account name is a prefix of the folder name. The new matching can also redact part of an unrelated URL component. Adds percent-encoded name matching to report and log redaction. It covers the supplied examples but needs URL-aware matching and component boundaries to protect names reliably without altering unrelated paths. **Blocking (2)**: must change before merging. 1. **L1** `builder/crates/crash/src/redact.rs:82`: The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. (more on the line) **Do:** Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name. 2. **L2** `builder/crates/crash/src/redact.rs:33`: The generated spelling does not cover valid file URL encodings. (more on the line) **Do:** Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms. **Should fix (1)**: not blocking, but worth doing before merging. - **L3** `builder/crates/crash/src/redact.rs:86`: A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. (more on the line) **Do:** Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `builder/crates/crash/src/redact.rs:82`: The Windows manual report check listed as still to test has not been reported. (more on the line) **Do:** Run the listed Windows manual report check and confirm the name is absent. `@fix` can do L1, L2 and L3. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the two supplied examples: the author reports that the new test fails on main and passes on this branch. Coverage of other valid URL encodings and overlapping account and folder names is incomplete. **Other systems:** Who::redact and redact_bytes also serve builder logs and diagnostic reports, so the matching changes apply beyond manual crash reports. The code uses the same byte matching on Linux and Windows, with Windows-specific case handling; the reported test covers simulated Windows rules on Debian, not a Windows run. **Switches:** None. **Reviewed:** fc2fcc563e57 against b77c2f4b3e41: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, both commits, the complete diff and redact.rs in full; inspected redaction callers and the fix-with-test rules. docs/review-checklist.md and ../Tooling/AGENTS.md were not present. No recorded runs, translations or generated files changed.; nothing run (a code review). **Checked and fine:** - The new test exercises the redaction behavior and the author reports it fails on main and passes on the branch. - Both commits record AI assistance; no game-derived or generated files are changed. - No switch, renderer API, shader, dependency or third-party file changes. **Testing:** Read-only review; no code or tests were run. The author reports 28 crash-crate tests passing on Debian and CI is still running. **Overlaps and merge order:** No overlapping pull requests found in the supplied context; the network was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -29,0 +30,4 @@
/// `name` as a file URL writes it: a space as `%20` and a non-ASCII byte as `%XX` (uppercase), the rest
/// (separators included) unchanged. None when it has neither, so [`line_bytes`]'s plain match already covers it.
fn url_form(name: &[u8]) -> Option<Vec<u8>> {
Member

L2 (blocking): The generated spelling does not cover valid file URL encodings.

When: On Linux, file:///home/jos%c3%a9/x does not match the uppercase escapes generated for josé because matches_at is case-sensitive. A folder such as Jane#Doe can likewise appear as Jane%23Doe, but url_form returns None, leaving the folder name in the report.

Do: Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms.

**L2** (blocking): The generated spelling does not cover valid file URL encodings. *When:* On Linux, file:///home/jos%c3%a9/x does not match the uppercase escapes generated for josé because matches_at is case-sensitive. A folder such as Jane#Doe can likewise appear as Jane%23Doe, but url_form returns None, leaving the folder name in the report. **Do:** Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms.
@ -59,2 +79,4 @@
continue;
}
// (the same name as a file URL has it: %20 for a space, %XX for a non-ASCII byte)
if let Some(enc) = &user_url
Member

L1 (blocking): The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it.

When: With Windows username John and profile folder John Doe, the plain user match treats the percent sign in file:///C:/Users/John%20Doe/x as a boundary and produces %20Doe. The subsequent folder pass can no longer match John%20Doe, leaving the surname in the report.

Do: Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name.

**L1** (blocking): The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. *When:* With Windows username John and profile folder John Doe, the plain user match treats the percent sign in file:///C:/Users/John%20Doe/x as a boundary and produces <user>%20Doe. The subsequent folder pass can no longer match John%20Doe, leaving the surname in the report. **Do:** Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name.
Member

L4 (should fix): The Windows manual report check listed as still to test has not been reported.

When: A Windows profile with a space or non-ASCII name needs a report containing a file URL checked through the actual report flow.

Do: Run the listed Windows manual report check and confirm the name is absent.

**L4** (should fix): The Windows manual report check listed as still to test has not been reported. *When:* A Windows profile with a space or non-ASCII name needs a report containing a file URL checked through the actual report flow. **Do:** Run the listed Windows manual report check and confirm the name is absent.
@ -61,0 +83,4 @@
&& i > 0
&& sep(line[i - 1])
&& matches_at(line, i, enc, windows)
&& (i + enc.len() >= line.len() || !name_char(line[i + enc.len()]))
Member

L3 (should fix): A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder.

When: For user josé, file:///home/jos%C3%A9%20backup/x becomes file:///home/%20backup/x even though the component is josé backup, not the user's name.

Do: Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component.

**L3** (should fix): A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. *When:* For user josé, file:///home/jos%C3%A9%20backup/x becomes file:///home/<user>%20backup/x even though the component is josé backup, not the user's name. **Do:** Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component.
Owner
@fix
Member

I didn't fix this pull request: the change I made would take out 22 of the 36 lines this pull request adds outside its tests, which undoes it rather than fixing it. So L1, L2 and L3 are the author's now. Nothing was pushed.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I didn't fix this pull request: the change I made would take out 22 of the 36 lines this pull request adds outside its tests, which undoes it rather than fixing it. So L1, L2 and L3 are the author's now. Nothing was pushed. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner
@fix
BeanBot force-pushed fix/redact-url-percent from fc2fcc563e
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to eb53494ee9
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-12-04 18:11:29 +00:00
Compare
BeanBot requested changes 2026-12-04 18:11:53 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. Valid file URLs can still expose a player's name, and the new matching can also redact part of an unrelated folder name. The Windows report flow remains untested.

What @fix changed
I changed this pull request: the new head is eb53494ee9. I rebased it onto main (a87eb85099).

Nothing was built or run: the checks run again on the new head.

The change redacts some percent-encoded names in file URLs in reports and logs, but incomplete matching leaves privacy gaps and can alter unrelated paths.

Blocking (2): must change before merging.

  1. L1 builder/crates/crash/src/redact.rs:82: The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. When: With Windows username John and profile folder John Doe, the plain user match treats the percent sign in file:///C:/Users/John%20Doe/x as a boundary and produces %20Doe. The subsequent folder pass can no longer match John%20Doe, leaving the surname in the report. Do: Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name. (for the author: @fix couldn't: Who::redact and redact_bytes still process the account name before the folder name. For account John and folder John Doe, the plain pass replaces John in John%20Doe, leaving %20Doe and preventing the )
  2. L2 builder/crates/crash/src/redact.rs:33: The generated spelling does not cover valid file URL encodings. When: On Linux, file:///home/jos%c3%a9/x does not match the uppercase escapes generated for josé because matches_at is case-sensitive. A folder such as Jane#Doe can likewise appear as Jane%23Doe, but url_form returns None, leaving the folder name in the report. Do: Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms. (for the author: @fix couldn't: url_form still emits only uppercase escapes for spaces and non-ASCII bytes; valid lowercase escapes on Linux and percent-encoded ASCII characters are not matched.)

Should fix (1): not blocking, but worth doing before merging.

  • L3 builder/crates/crash/src/redact.rs:86: A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. When: For user josé, file:///home/jos%C3%A9%20backup/x becomes file:///home/%20backup/x even though the component is josé backup, not the user's name. Do: Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component. (for the author: @fix couldn't: The encoded-name branch still treats a following percent sign as a component boundary, so an encoded name followed by another escape can be partially redacted.)

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L4 builder/crates/crash/src/redact.rs:82: The Windows manual report check listed as still to test has not been reported. When: A Windows profile with a space or non-ASCII name needs a report containing a file URL checked through the actual report flow. Do: Run the listed Windows manual report check and confirm the name is absent.

Checks: they run again on this head; a failure shows on the pull request.

More: does it help, other systems, switches, what was read

Does it help: Unproven overall: the author reports that the new test fails on main and passes here on Debian 13, but valid encodings and overlapping account and folder names remain unhandled.

Other systems: The shared redactor also processes builder logs, game-log copies and diagnostic reports on Windows and Linux. The matching defects affect these callers as well; the reported test covers two synthetic URL examples.

Switches: None.

Reviewed: eb53494ee9 against a87eb85099: Read builder/crates/crash/src/redact.rs, AGENTS.md, CONTRIBUTING.md and docs/dev/standards.md in full; inspected the diff, commit list and redactor call sites. Other caller files were not read in full; no review checklist or pull request template was found by the file search.; nothing run (a code review).

Checked and fine:

  • The added test exercises both a Windows-style space and a Linux-style non-ASCII name.
  • No switches or dependencies are added.

Testing: The author reports the crash crate tests, clippy and rustfmt passed on Debian; the wider test run had failures described in the pull request. CI has not run on this head. No commands that build or run tests were executed in this review.

Overlaps and merge order: None identified in the supplied material.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Valid file URLs can still expose a player's name, and the new matching can also redact part of an unrelated folder name. The Windows report flow remains untested. **What `@fix` changed** I changed this pull request: the new head is eb53494ee9f1. I rebased it onto `main` (a87eb850999b). Nothing was built or run: the checks run again on the new head. The change redacts some percent-encoded names in file URLs in reports and logs, but incomplete matching leaves privacy gaps and can alter unrelated paths. **Blocking (2)**: must change before merging. 1. **L1** `builder/crates/crash/src/redact.rs:82`: The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. *When:* With Windows username John and profile folder John Doe, the plain user match treats the percent sign in file:///C:/Users/John%20Doe/x as a boundary and produces <user>%20Doe. The subsequent folder pass can no longer match John%20Doe, leaving the surname in the report. **Do:** Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name. *(for the author: `@fix` couldn't: Who::redact and redact_bytes still process the account name before the folder name. For account John and folder John Doe, the plain pass replaces John in John%20Doe, leaving %20Doe and preventing the )* 2. **L2** `builder/crates/crash/src/redact.rs:33`: The generated spelling does not cover valid file URL encodings. *When:* On Linux, file:///home/jos%c3%a9/x does not match the uppercase escapes generated for josé because matches_at is case-sensitive. A folder such as Jane#Doe can likewise appear as Jane%23Doe, but url_form returns None, leaving the folder name in the report. **Do:** Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms. *(for the author: `@fix` couldn't: url_form still emits only uppercase escapes for spaces and non-ASCII bytes; valid lowercase escapes on Linux and percent-encoded ASCII characters are not matched.)* **Should fix (1)**: not blocking, but worth doing before merging. - **L3** `builder/crates/crash/src/redact.rs:86`: A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. *When:* For user josé, file:///home/jos%C3%A9%20backup/x becomes file:///home/<user>%20backup/x even though the component is josé backup, not the user's name. **Do:** Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component. *(for the author: `@fix` couldn't: The encoded-name branch still treats a following percent sign as a component boundary, so an encoded name followed by another escape can be partially redacted.)* **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L4** `builder/crates/crash/src/redact.rs:82`: The Windows manual report check listed as still to test has not been reported. *When:* A Windows profile with a space or non-ASCII name needs a report containing a file URL checked through the actual report flow. **Do:** Run the listed Windows manual report check and confirm the name is absent. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven overall: the author reports that the new test fails on main and passes here on Debian 13, but valid encodings and overlapping account and folder names remain unhandled. **Other systems:** The shared redactor also processes builder logs, game-log copies and diagnostic reports on Windows and Linux. The matching defects affect these callers as well; the reported test covers two synthetic URL examples. **Switches:** None. **Reviewed:** eb53494ee9f1 against a87eb850999b: Read builder/crates/crash/src/redact.rs, AGENTS.md, CONTRIBUTING.md and docs/dev/standards.md in full; inspected the diff, commit list and redactor call sites. Other caller files were not read in full; no review checklist or pull request template was found by the file search.; nothing run (a code review). **Checked and fine:** - The added test exercises both a Windows-style space and a Linux-style non-ASCII name. - No switches or dependencies are added. **Testing:** The author reports the crash crate tests, clippy and rustfmt passed on Debian; the wider test run had failures described in the pull request. CI has not run on this head. No commands that build or run tests were executed in this review. **Overlaps and merge order:** None identified in the supplied material. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
Owner
@fix
BeanBot force-pushed fix/redact-url-percent from eb53494ee9
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 76baac323e
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 16s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m22s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 11m49s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m30s
CI / Website build and checks (pull_request) Failing after 42s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 12m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 14m40s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 45m21s
2026-12-04 18:24:54 +00:00
Compare
BeanBot left a comment

Recommendation: Request changes. The fix still leaves names in public reports for valid encoded URLs and when the account name is a prefix of the profile folder. It can also redact part of a different folder name.

What @fix changed
I changed this pull request: the new head is 76baac323e. I rebased it onto main (3b3ea2cb33).

Nothing was built or run: the checks run again on the new head.

The change redacts common percent-encoded names in file URLs, using the existing report redaction path. It adds a small amount of work per line but does not cover all the cases needed for reliable redaction.

Blocking (2): must change before merging.

  1. L1 builder/crates/crash/src/redact.rs:82: The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. When: With Windows username John and profile folder John Doe, the plain user match treats the percent sign in file:///C:/Users/John%20Doe/x as a boundary and produces %20Doe. The subsequent folder pass can no longer match John%20Doe, leaving the surname in the report. Do: Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name. (for the author: @fix couldn't: Both Who::redact and Who::redact_bytes still process the account name before the folder name; John is replaced inside John%20Doe before the John Doe folder pass can match.)
  2. L2 builder/crates/crash/src/redact.rs:33: The generated spelling does not cover valid file URL encodings. When: On Linux, file:///home/jos%c3%a9/x does not match the uppercase escapes generated for josé because matches_at is case-sensitive. A folder such as Jane#Doe can likewise appear as Jane%23Doe, but url_form returns None, leaving the folder name in the report. Do: Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms. (for the author: @fix couldn't: url_form still emits uppercase escapes only for spaces and non-ASCII bytes, so Linux lowercase escapes and encoded ASCII characters remain unmatched.)

Should fix (1): not blocking, but worth doing before merging.

  • L3 builder/crates/crash/src/redact.rs:86: A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. When: For user josé, file:///home/jos%C3%A9%20backup/x becomes file:///home/%20backup/x even though the component is josé backup, not the user's name. Do: Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component. (for the author: @fix couldn't: The encoded-name boundary still accepts a following percent sign, allowing a prefix of a longer encoded folder component to be replaced.)

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L4 builder/crates/crash/src/redact.rs:82: The Windows manual report check listed as still to test has not been reported. When: A Windows profile with a space or non-ASCII name needs a report containing a file URL checked through the actual report flow. Do: Run the listed Windows manual report check and confirm the name is absent.

Checks: they run again on this head; a failure shows on the pull request.

More: does it help, other systems, switches, what was read

Does it help: Unproven: the author reports that the new test fails on main and passes here, but the open cases still leak names. This is not a performance change.

Other systems: The same redactor is used for reports and builder log lines on Windows and Linux. The reported test covers representative strings on Debian; the Windows manual report flow remains untested.

Switches: None.

Reviewed: 76baac323e against 3b3ea2cb33: Read AGENTS.md, CONTRIBUTING.md, the full changed redaction file, both commit messages, the diff and redaction call-site search results. The PR template and developer standards were not read; other caller files and generated test cases were not read in full.; nothing run (a code review).

Checked and fine:

  • The supplied test covers a space-encoded Windows folder and an uppercase UTF-8-encoded Linux folder.
  • No switches were added or changed.

Testing: The author reports 28 crash-crate tests passing on Debian and a regression test failing on main. CI has not run on this head; the Windows manual report check remains outstanding. No tests were run during this review.

Overlaps and merge order: Not checked.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The fix still leaves names in public reports for valid encoded URLs and when the account name is a prefix of the profile folder. It can also redact part of a different folder name. **What `@fix` changed** I changed this pull request: the new head is 76baac323e41. I rebased it onto `main` (3b3ea2cb33e0). Nothing was built or run: the checks run again on the new head. The change redacts common percent-encoded names in file URLs, using the existing report redaction path. It adds a small amount of work per line but does not cover all the cases needed for reliable redaction. **Blocking (2)**: must change before merging. 1. **L1** `builder/crates/crash/src/redact.rs:82`: The account-name pass can consume the start of the encoded folder name before the folder-name pass sees it. *When:* With Windows username John and profile folder John Doe, the plain user match treats the percent sign in file:///C:/Users/John%20Doe/x as a boundary and produces <user>%20Doe. The subsequent folder pass can no longer match John%20Doe, leaving the surname in the report. **Do:** Match the full URL component against both account and profile-folder names before replacing either, and add a test where the account name is a prefix of the encoded folder name. *(for the author: `@fix` couldn't: Both Who::redact and Who::redact_bytes still process the account name before the folder name; John is replaced inside John%20Doe before the John Doe folder pass can match.)* 2. **L2** `builder/crates/crash/src/redact.rs:33`: The generated spelling does not cover valid file URL encodings. *When:* On Linux, file:///home/jos%c3%a9/x does not match the uppercase escapes generated for josé because matches_at is case-sensitive. A folder such as Jane#Doe can likewise appear as Jane%23Doe, but url_form returns None, leaving the folder name in the report. **Do:** Compare URL components by decoding percent escapes, accepting either hex case and escaped ASCII bytes, while preserving the platform's rules for name comparison; test these forms. *(for the author: `@fix` couldn't: url_form still emits uppercase escapes only for spaces and non-ASCII bytes, so Linux lowercase escapes and encoded ASCII characters remain unmatched.)* **Should fix (1)**: not blocking, but worth doing before merging. - **L3** `builder/crates/crash/src/redact.rs:86`: A percent escape following the encoded name is treated as the end of a component, so the new branch can redact a prefix of a different folder. *When:* For user josé, file:///home/jos%C3%A9%20backup/x becomes file:///home/<user>%20backup/x even though the component is josé backup, not the user's name. **Do:** Check the decoded component boundary rather than treating a percent escape as a delimiter, and test a longer encoded component. *(for the author: `@fix` couldn't: The encoded-name boundary still accepts a following percent sign, allowing a prefix of a longer encoded folder component to be replaced.)* **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L4** `builder/crates/crash/src/redact.rs:82`: The Windows manual report check listed as still to test has not been reported. *When:* A Windows profile with a space or non-ASCII name needs a report containing a file URL checked through the actual report flow. **Do:** Run the listed Windows manual report check and confirm the name is absent. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the author reports that the new test fails on main and passes here, but the open cases still leak names. This is not a performance change. **Other systems:** The same redactor is used for reports and builder log lines on Windows and Linux. The reported test covers representative strings on Debian; the Windows manual report flow remains untested. **Switches:** None. **Reviewed:** 76baac323e41 against 3b3ea2cb33e0: Read AGENTS.md, CONTRIBUTING.md, the full changed redaction file, both commit messages, the diff and redaction call-site search results. The PR template and developer standards were not read; other caller files and generated test cases were not read in full.; nothing run (a code review). **Checked and fine:** - The supplied test covers a space-encoded Windows folder and an uppercase UTF-8-encoded Linux folder. - No switches were added or changed. **Testing:** The author reports 28 crash-crate tests passing on Debian and a regression test failing on main. CI has not run on this head; the Windows manual report check remains outstanding. No tests were run during this review. **Overlaps and merge order:** Not checked. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
Author
Contributor

Closing: filed as issue #3199 for the maintainers instead. The robust fix needs changes to the redaction matcher (match the full URL component against both the account and folder name, longest first, and decode percent escapes rather than generate one spelling) — review here found a drop-in misses a username that is a prefix of the folder, lowercase hex, and reserved-ASCII escapes. That is better done in the reworked redaction code; #3199 has the cases and a starting point. Umbrella: #1093.

Closing: filed as issue #3199 for the maintainers instead. The robust fix needs changes to the redaction matcher (match the full URL component against both the account and folder name, longest first, and decode percent escapes rather than generate one spelling) — review here found a drop-in misses a username that is a prefix of the folder, lowercase hex, and reserved-ASCII escapes. That is better done in the reworked redaction code; #3199 has the cases and a starting point. Umbrella: #1093.
PedroRossi closed this pull request 2026-12-04 20:16:54 +00:00
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 16s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m22s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 11m49s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m30s
CI / Website build and checks (pull_request) Failing after 42s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 12m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 14m40s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 45m21s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3184
No description provided.