fix(builder): every crash report line takes the build report's scrub #3035

Closed
PedroRossi wants to merge 2 commits from PedroRossi/Longshot:fix/crash-report-name-forms into main
Contributor

Summary

Crash reports can carry a Windows player's real name. Every report's lines (store.rs, clean.rs, and the bundle in
diag.rs) go through Who::redact (builder/crates/crash/src/redact.rs), which took out the home folder and the user
name only exactly as written. Windows writes that folder in other forms, which drivers and Vulkan put in the log as
they are: an 8.3 short name (C:\Users\JOHNDO~1\..., common in temporary paths), a file URL
(file:///C:/Users/John%20Doe/...) or the \\?\ prefix. Those reached the report with the name in them; on many
PCs the account name is the person's own, and the manual report is meant for public issues.

The crate already has a scrub that knows these forms, build_report::scrub, which only the bundle added on its own.
Who::redact now ends with it, so every report's lines get it, and diag.rs's own copy goes.

How to see it on main: a line with the home folder written as C:\Users\JOHNDO~1\ or file:///C:/Users/John%20Doe/
keeps the name after Who::redact (the new test's lines).

See #1093, which asks for user names out of the generated files: this covers the crash reports' lines.

Read first: Who::redact, then write in diag.rs.

Testing

Tested: on this PC (Linux): the new test (who_takes_the_name_out_in_the_forms_a_log_line_carries_it) fails
on main, the name left in those forms, and passes here; the crash crate's tests, clippy -D warnings on it and on
longshot-builder, rustfmt. As pr create asks for a builder change: Debian 13, GeForce GTX 1660 SUPER, NVIDIA 550.163.01: the game built by a builder from main @ b40214d2 with this change merged (with #3034), through the PC's job queue, played twice from the Market entrance repository save into play (after loading it shows a menu state first, as main @ b40214d2 does on this PC in 2 of 3 runs), then the control bridge's quit; exit 0. The crash code this changes runs when a report is made, not in a build or the game. mise run test (--strict) on main @ b40214d2, and on main with this change merged (with #3034, from the same audit), through the PC's job queue: 763 passed, 167 failed, 10 skipped both ways, so none fails only with it. The 167 are named at the end.

Still to test:

  • Windows, by hand: from an account whose name has a space or more than 8 letters, make a manual crash report,
    expecting no form of the name in it

Measurements

Nothing to measure: a few string replacements per report line, once when a report is made.

Risks

The scrub also takes the home's own name out where it is any path's folder, as the bundle already did: a report says
a little less. 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.
The 167 checks of mise run test that fail on main @ b40214d2 on this PC too, with or without this change

99 need a tool this PC doesn't have on PATH (--strict fails them):

  • clang (63): test_audio_output_devices.py, test_box_light_reuse.py, test_camera_centering.py, test_camera_speed.py, test_drive_target.py, test_dynres_sites.py, test_exclusive_marks.py, test_fixed_scale_sites.py, test_floor_carry_step.py, test_frame_rate_cap_step.py, test_frame_whole.py, test_free_view_anchor.py, test_fullscreen_monitor_platform.py, test_high_fps_fixes.py, test_horse_jump_step.py, test_hos_ab.py, test_hud_layout.py, test_jump_takeoff_step.py, test_linux_audio_output.py, test_loop_step.py, test_menu_hooks.py, test_microphone_test_gain.py, test_monitor_friendly_names.py, test_mouse_native.py, test_movement_speed.py, test_movie_frame_count.py, test_nvn_null_pool.py, test_nvn_tex_builder_guard.py, test_ocarina_wait.py, test_ocb_hold.py, test_oot_barrier.py, test_oot_camera_clearance.py, test_oot_cloth.py, test_oot_cloth_60.py, test_oot_cloth_time.py, test_oot_damage.py, test_oot_fov.py, test_oot_heap_retry.py, test_oot_jitter.py, test_oot_shadow.py, test_oot_shadow_fit.py, test_oot_transition_autosave.py, test_oot_voice_option.py, test_oot_wide_bubble.py, test_oot_wide_save_picture.py, test_player_update_sites.py, test_sampler_stack_walk.py, test_saved_turn_rate.py, test_scarecrow_timing.py, test_scene_format.py, test_sdl_monitor_names.py, test_shadow_slot.py, test_song_note_cue.py, test_sound_held_frames.py, test_sprint.py, test_svc_core_mask.py, test_tex_compact.py, test_text_speed.py, test_title_card_sites.py, test_water_substeps.py, test_web_floor_steps.py, test_wide_sites.py, test_wide_ui.py
  • spirv-val (20): f2i_immediate, global_load_16, native_suatom, test_coop_spirv.py, test_default_point_size.py, test_depth_sample_types.py, test_draw_parameters.py, test_fsr4_tune.py, test_guest_page_fast32.py, test_image_arrays.py, test_mesh_fallback_layout.py, test_mesh_unreachable_outputs.py, test_mma_software.py, test_native_float_atomic_add.py, test_nonuniform_image_arrays.py, test_spirv_struct_identity.py, test_texture_phi_dominance.py, test_unsigned_image_types.py, test_vendor_translation.py, test_wmma16_spirv_val.py
  • clang++ (7): test_dead_targets_sweep.py, test_lower_depbar.py, test_lower_lds_after_sts.py, test_lower_register_markers.py, test_native_suatom.py, test_program_answer_domains.py, test_target_pool_cap.py
  • glslang (7): test_dlssg_hud_ui.py, test_dlssg_hudless_pq.py, test_framegen_hdr.py, test_fsr3fi_hud_layer.py, test_fsr3fi_hudless_colour.py, test_host_shaders.py, test_temporal_present_bandwidth.py
  • glslang, spirv-val (1): test_fsr3_shaders.py
  • llvm-mc (1): test_lifter.py

68 fail on main itself: test_astc_upload_chunking.py, test_async_astc_upload_chunks.py, test_bind_memo.py, test_blocks_at_start.py, test_bug_report.py, test_cloth_kernels.py, test_cloth_loops.py, test_cloth_sphere.py, test_cloth_step12.py, test_cloth_step8.py, test_cloth_step9.py, test_control_picture.py, test_crash_record.py, test_crt_options.py, test_dev_update.py, test_dlssg_pace.py, test_draw_stream_visibility.py, test_drawn_page_map.py, test_early_split_before_draw.py, test_flat_map.py, test_framegen_resources.py, test_fsr_image_retirement.py, test_fsr_uniform_ownership.py, test_game_boundary.py, test_guest_holes.py, test_image_reaper_threads.py, test_image_view_retry.py, test_import_reach.py, test_input_background.py, test_keyboard_option.py, test_late_fix_build.py, test_linux_pressure.py, test_loaded_modules_drop.py, test_log_levels.py, test_menu_keys.py, test_menu_save_atomic.py, test_mesh_first_types.py, test_mirror_bookkeeping.py, test_oot_occ_raster.py, test_option_ids.py, test_pass_barrier.py, test_perf_send.py, test_pipeline_tour.py, test_present_acquire_ahead.py, test_present_image_free.py, test_present_source_crop.py, test_program_cache_cleanup.py, test_program_cache_one_variant.py, test_readback_timeout_reuse.py, test_recorder_sync.py, test_recording_admission.py, test_report_words.py, test_screensaver.py, test_staging_burst.py, test_switch_table.py, test_target_retention.py, test_tex_desc_memo.py, test_thinlto_tls.py, test_ub_snapshot_default.py, test_ub_snapshot_gpu_writes.py, test_upscaler_round_trip.py, test_vk_wb_cpu_words_fast.py, test_vram_compact.py, test_wb_diff_stale_shadow.py, test_wb_pending_capture.py, test_windows_display_startup.py, test_windows_on_linux.py, test_wrote_regions.py


Found in an AI-assisted audit of the repository. The test, the fix, the runs 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 carry a Windows player's real name. Every report's lines (`store.rs`, `clean.rs`, and the bundle in `diag.rs`) go through `Who::redact` (`builder/crates/crash/src/redact.rs`), which took out the home folder and the user name only exactly as written. Windows writes that folder in other forms, which drivers and Vulkan put in the log as they are: an 8.3 short name (`C:\Users\JOHNDO~1\...`, common in temporary paths), a file URL (`file:///C:/Users/John%20Doe/...`) or the `\\?\` prefix. Those reached the report with the name in them; on many PCs the account name is the person's own, and the manual report is meant for public issues. The crate already has a scrub that knows these forms, `build_report::scrub`, which only the bundle added on its own. `Who::redact` now ends with it, so every report's lines get it, and `diag.rs`'s own copy goes. How to see it on main: a line with the home folder written as `C:\Users\JOHNDO~1\` or `file:///C:/Users/John%20Doe/` keeps the name after `Who::redact` (the new test's lines). See #1093, which asks for user names out of the generated files: this covers the crash reports' lines. Read first: `Who::redact`, then `write` in `diag.rs`. ## Testing **Tested:** on this PC (Linux): the new test (`who_takes_the_name_out_in_the_forms_a_log_line_carries_it`) fails on main, the name left in those forms, and passes here; the crash crate's tests, clippy -D warnings on it and on longshot-builder, rustfmt. As `pr create` asks for a builder change: Debian 13, GeForce GTX 1660 SUPER, NVIDIA 550.163.01: the game built by a builder from main @ b40214d2 with this change merged (with #3034), through the PC's job queue, played twice from the Market entrance repository save into play (after loading it shows a menu state first, as main @ b40214d2 does on this PC in 2 of 3 runs), then the control bridge's quit; exit 0. The crash code this changes runs when a report is made, not in a build or the game. `mise run test` (`--strict`) on main @ b40214d2, and on main with this change merged (with #3034, from the same audit), through the PC's job queue: 763 passed, 167 failed, 10 skipped both ways, so none fails only with it. The 167 are named at the end. **Still to test:** - Windows, by hand: from an account whose name has a space or more than 8 letters, make a manual crash report, expecting no form of the name in it ## Measurements Nothing to measure: a few string replacements per report line, once when a report is made. ## Risks The scrub also takes the home's own name out where it is any path's folder, as the bundle already did: a report says a little less. 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. <details><summary>The 167 checks of <code>mise run test</code> that fail on main @ b40214d2 on this PC too, with or without this change</summary> 99 need a tool this PC doesn't have on PATH (`--strict` fails them): - clang (63): test_audio_output_devices.py, test_box_light_reuse.py, test_camera_centering.py, test_camera_speed.py, test_drive_target.py, test_dynres_sites.py, test_exclusive_marks.py, test_fixed_scale_sites.py, test_floor_carry_step.py, test_frame_rate_cap_step.py, test_frame_whole.py, test_free_view_anchor.py, test_fullscreen_monitor_platform.py, test_high_fps_fixes.py, test_horse_jump_step.py, test_hos_ab.py, test_hud_layout.py, test_jump_takeoff_step.py, test_linux_audio_output.py, test_loop_step.py, test_menu_hooks.py, test_microphone_test_gain.py, test_monitor_friendly_names.py, test_mouse_native.py, test_movement_speed.py, test_movie_frame_count.py, test_nvn_null_pool.py, test_nvn_tex_builder_guard.py, test_ocarina_wait.py, test_ocb_hold.py, test_oot_barrier.py, test_oot_camera_clearance.py, test_oot_cloth.py, test_oot_cloth_60.py, test_oot_cloth_time.py, test_oot_damage.py, test_oot_fov.py, test_oot_heap_retry.py, test_oot_jitter.py, test_oot_shadow.py, test_oot_shadow_fit.py, test_oot_transition_autosave.py, test_oot_voice_option.py, test_oot_wide_bubble.py, test_oot_wide_save_picture.py, test_player_update_sites.py, test_sampler_stack_walk.py, test_saved_turn_rate.py, test_scarecrow_timing.py, test_scene_format.py, test_sdl_monitor_names.py, test_shadow_slot.py, test_song_note_cue.py, test_sound_held_frames.py, test_sprint.py, test_svc_core_mask.py, test_tex_compact.py, test_text_speed.py, test_title_card_sites.py, test_water_substeps.py, test_web_floor_steps.py, test_wide_sites.py, test_wide_ui.py - spirv-val (20): f2i_immediate, global_load_16, native_suatom, test_coop_spirv.py, test_default_point_size.py, test_depth_sample_types.py, test_draw_parameters.py, test_fsr4_tune.py, test_guest_page_fast32.py, test_image_arrays.py, test_mesh_fallback_layout.py, test_mesh_unreachable_outputs.py, test_mma_software.py, test_native_float_atomic_add.py, test_nonuniform_image_arrays.py, test_spirv_struct_identity.py, test_texture_phi_dominance.py, test_unsigned_image_types.py, test_vendor_translation.py, test_wmma16_spirv_val.py - clang++ (7): test_dead_targets_sweep.py, test_lower_depbar.py, test_lower_lds_after_sts.py, test_lower_register_markers.py, test_native_suatom.py, test_program_answer_domains.py, test_target_pool_cap.py - glslang (7): test_dlssg_hud_ui.py, test_dlssg_hudless_pq.py, test_framegen_hdr.py, test_fsr3fi_hud_layer.py, test_fsr3fi_hudless_colour.py, test_host_shaders.py, test_temporal_present_bandwidth.py - glslang, spirv-val (1): test_fsr3_shaders.py - llvm-mc (1): test_lifter.py 68 fail on main itself: test_astc_upload_chunking.py, test_async_astc_upload_chunks.py, test_bind_memo.py, test_blocks_at_start.py, test_bug_report.py, test_cloth_kernels.py, test_cloth_loops.py, test_cloth_sphere.py, test_cloth_step12.py, test_cloth_step8.py, test_cloth_step9.py, test_control_picture.py, test_crash_record.py, test_crt_options.py, test_dev_update.py, test_dlssg_pace.py, test_draw_stream_visibility.py, test_drawn_page_map.py, test_early_split_before_draw.py, test_flat_map.py, test_framegen_resources.py, test_fsr_image_retirement.py, test_fsr_uniform_ownership.py, test_game_boundary.py, test_guest_holes.py, test_image_reaper_threads.py, test_image_view_retry.py, test_import_reach.py, test_input_background.py, test_keyboard_option.py, test_late_fix_build.py, test_linux_pressure.py, test_loaded_modules_drop.py, test_log_levels.py, test_menu_keys.py, test_menu_save_atomic.py, test_mesh_first_types.py, test_mirror_bookkeeping.py, test_oot_occ_raster.py, test_option_ids.py, test_pass_barrier.py, test_perf_send.py, test_pipeline_tour.py, test_present_acquire_ahead.py, test_present_image_free.py, test_present_source_crop.py, test_program_cache_cleanup.py, test_program_cache_one_variant.py, test_readback_timeout_reuse.py, test_recorder_sync.py, test_recording_admission.py, test_report_words.py, test_screensaver.py, test_staging_burst.py, test_switch_table.py, test_target_retention.py, test_tex_desc_memo.py, test_thinlto_tls.py, test_ub_snapshot_default.py, test_ub_snapshot_gpu_writes.py, test_upscaler_round_trip.py, test_vk_wb_cpu_words_fast.py, test_vram_compact.py, test_wb_diff_stale_shadow.py, test_wb_pending_capture.py, test_windows_display_startup.py, test_windows_on_linux.py, test_wrote_regions.py </details> --- Found in an AI-assisted audit of the repository. The test, the fix, the runs 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, which every crash report's lines go through, takes out only the exact home path and user name: it leaves
C:\Users\JOHNDO~1\ (Windows' 8.3 short name, common in %TEMP%), file:///C:/Users/John%20Doe/ and \\?\C:\Users\...
as they are. The test's lines carry the name in those forms; fails on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): every crash report line takes the build report's scrub
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
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
a66a5dfaa6
Who::redact ends with crate::build_report::scrub, which knows those forms and which the bundle (diag.rs) added on its
own: every report's lines get it now (store.rs, clean.rs too), and diag.rs's own scrub goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Tested in game: Debian 13, GeForce GTX 1660 SUPER, NVIDIA 550.163.01: the game built by a builder from main @ b40214d2 with this change merged, through the PC's job queue, played twice from the Market entrance repository save into play (after loading it shows a menu state first, as main @ b40214d2 does on this PC in 2 of 3 runs), then the control bridge's quit; exit 0. The crash code this changes runs when a report is made, not in a build or the game.

Tested in game: Debian 13, GeForce GTX 1660 SUPER, NVIDIA 550.163.01: the game built by a builder from main @ b40214d2 with this change merged, through the PC's job queue, played twice from the Market entrance repository save into play (after loading it shows a menu state first, as main @ b40214d2 does on this PC in 2 of 3 runs), then the control bridge's quit; exit 0. The crash code this changes runs when a report is made, not in a build or the game.
Member

Possibly related, for context:

  • issue #1093 Idea: Redact sensitive information from generated files — Open request to redact usernames from generated crash reports
Possibly related, for context: - issue #1093 Idea: Redact sensitive information from generated files — Open request to redact usernames from generated crash reports
PedroRossi changed title from WIP: fix(builder): every crash report line takes the build report's scrub to fix(builder): every crash report line takes the build report's scrub 2026-12-02 21:02:21 +00:00
Author
Contributor

Linked #1093 (BeanBot's pointer), which asks for user names out of generated files; this PR covers the crash reports' lines.

Linked #1093 (BeanBot's pointer), which asks for user names out of generated files; this PR covers the crash reports' lines.
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The new scrub removes the tested path forms, but it can still leave parts of a player’s name in the Windows paths this fix is meant to protect. Public reports can therefore disclose personal information.

The change applies the existing build-report scrubber to crash-report lines and removes the duplicate call in diagnostic bundles. It improves redaction for the tested forms, at the cost of removing some additional folder names from reports.

Blocking (3): must change before merging.

  1. L1 builder/crates/crash/src/redact.rs:106: The first redaction can alter an encoded home folder before the build-report scrubber has a chance to recognize it. (more on the line) Do: Scrub the original line before applying the game's rule, or otherwise preserve complete encoded folder names until they are matched. Add a test where the username is a prefix of the home folder name.
  2. L2 builder/crates/crash/src/redact.rs:106: The reused scrubber assumes every 8.3 alias has six name characters before the tilde, so it misses aliases with a multi-digit suffix. (more on the line) Do: Match valid short-name prefixes according to the suffix length, or resolve the actual short path on Windows, and add a multi-digit alias test.
  3. L3 builder/crates/crash/src/redact.rs:106: File URLs with percent-encoded non-ASCII characters are not redacted by the reused scrubber. (more on the line) Do: Match percent-encoded UTF-8 path components as well as literal names, with a test covering a non-ASCII Windows home folder.

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: The intended Windows manual-report check is still outstanding. When: The reported test uses synthetic Windows paths on Linux; it does not show what a Windows account and its drivers actually put in a generated report. Do: On Windows, generate a manual crash report from an account with a spaced or long home folder and check that 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 supplied synthetic examples: the author reports that the new test fails on the base and passes on this change. Coverage is incomplete for other valid Windows path forms.

Other systems: The change affects crash logs and fields on Windows and Linux, including manual reports and diagnostic bundles; it does not run in the game. Diagnostic bundles already used the same scrubber after the game's rule. A Windows manual-report run remains outstanding.

Switches: None.

Reviewed: a66a5dfaa6 against b40214d2bb: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, both changed files and the build-report scrubber. Read the relevant crash-report callers and their surrounding code; skimmed related tests. The review checklist was absent, and the referenced sibling Tooling checkout was unavailable. No generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The diff adds no switch, generated file, game-derived output, dependency, or renderer API change.
  • The new synthetic test exercises the changed redaction and would fail without the added scrub.

Testing: No commands from the project or tests were run, as requested. The author reports the crash-crate tests passing on Linux; CI is still running.

Overlaps and merge order: None found in the supplied information.


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

**Recommendation: Request changes.** The new scrub removes the tested path forms, but it can still leave parts of a player’s name in the Windows paths this fix is meant to protect. Public reports can therefore disclose personal information. The change applies the existing build-report scrubber to crash-report lines and removes the duplicate call in diagnostic bundles. It improves redaction for the tested forms, at the cost of removing some additional folder names from reports. **Blocking (3)**: must change before merging. 1. **L1** `builder/crates/crash/src/redact.rs:106`: The first redaction can alter an encoded home folder before the build-report scrubber has a chance to recognize it. (more on the line) **Do:** Scrub the original line before applying the game's rule, or otherwise preserve complete encoded folder names until they are matched. Add a test where the username is a prefix of the home folder name. 2. **L2** `builder/crates/crash/src/redact.rs:106`: The reused scrubber assumes every 8.3 alias has six name characters before the tilde, so it misses aliases with a multi-digit suffix. (more on the line) **Do:** Match valid short-name prefixes according to the suffix length, or resolve the actual short path on Windows, and add a multi-digit alias test. 3. **L3** `builder/crates/crash/src/redact.rs:106`: File URLs with percent-encoded non-ASCII characters are not redacted by the reused scrubber. (more on the line) **Do:** Match percent-encoded UTF-8 path components as well as literal names, with a test covering a non-ASCII Windows home folder. **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**: The intended Windows manual-report check is still outstanding. *When:* The reported test uses synthetic Windows paths on Linux; it does not show what a Windows account and its drivers actually put in a generated report. **Do:** On Windows, generate a manual crash report from an account with a spaced or long home folder and check that 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 supplied synthetic examples: the author reports that the new test fails on the base and passes on this change. Coverage is incomplete for other valid Windows path forms. **Other systems:** The change affects crash logs and fields on Windows and Linux, including manual reports and diagnostic bundles; it does not run in the game. Diagnostic bundles already used the same scrubber after the game's rule. A Windows manual-report run remains outstanding. **Switches:** None. **Reviewed:** a66a5dfaa614 against b40214d2bb8d: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, both changed files and the build-report scrubber. Read the relevant crash-report callers and their surrounding code; skimmed related tests. The review checklist was absent, and the referenced sibling Tooling checkout was unavailable. No generated files or translations changed.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The diff adds no switch, generated file, game-derived output, dependency, or renderer API change. - The new synthetic test exercises the changed redaction and would fail without the added scrub. **Testing:** No commands from the project or tests were run, as requested. The author reports the crash-crate tests passing on Linux; CI is still running. **Overlaps and merge order:** None found in the supplied information. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -102,2 +104,3 @@
/// they reach the team, and the bundle and the manual report public issues.
pub fn redact(&self, s: &str) -> String {
line(s, &self.home, &self.user, self.windows)
crate::build_report::scrub(&line(s, &self.home, &self.user, self.windows), &self.home, &[self.user.as_str()])
Member

L1 (blocking): The first redaction can alter an encoded home folder before the build-report scrubber has a chance to recognize it.

When: With home C:\Users\John Doe and username John, a file:///C:/Users/John%20Doe/x log line first becomes file:///C:/Users/<user>%20Doe/x: line treats % as the end of the username. The following scrub cannot match the original home or folder name, leaving Doe in the report.

Do: Scrub the original line before applying the game's rule, or otherwise preserve complete encoded folder names until they are matched. Add a test where the username is a prefix of the home folder name.

**L1** (blocking): The first redaction can alter an encoded home folder before the build-report scrubber has a chance to recognize it. *When:* With home `C:\Users\John Doe` and username `John`, a `file:///C:/Users/John%20Doe/x` log line first becomes `file:///C:/Users/<user>%20Doe/x`: `line` treats `%` as the end of the username. The following scrub cannot match the original home or folder name, leaving `Doe` in the report. **Do:** Scrub the original line before applying the game's rule, or otherwise preserve complete encoded folder names until they are matched. Add a test where the username is a prefix of the home folder name.
Member

L2 (blocking): The reused scrubber assumes every 8.3 alias has six name characters before the tilde, so it misses aliases with a multi-digit suffix.

When: For home folder John Doe, a valid collision-generated alias such as JOHND~10 has five prefix characters. short_name produces JOHNDO, so the scrubber leaves C:\Users\JOHND~10\... in the report.

Do: Match valid short-name prefixes according to the suffix length, or resolve the actual short path on Windows, and add a multi-digit alias test.

**L2** (blocking): The reused scrubber assumes every 8.3 alias has six name characters before the tilde, so it misses aliases with a multi-digit suffix. *When:* For home folder `John Doe`, a valid collision-generated alias such as `JOHND~10` has five prefix characters. `short_name` produces `JOHNDO`, so the scrubber leaves `C:\Users\JOHND~10\...` in the report. **Do:** Match valid short-name prefixes according to the suffix length, or resolve the actual short path on Windows, and add a multi-digit alias test.
Member

L3 (blocking): File URLs with percent-encoded non-ASCII characters are not redacted by the reused scrubber.

When: For a home folder named José, a log URL containing file:///C:/Users/Jos%C3%A9/x matches neither the literal name nor the scrubber's special handling for %20, so the encoded name remains in a public report.

Do: Match percent-encoded UTF-8 path components as well as literal names, with a test covering a non-ASCII Windows home folder.

**L3** (blocking): File URLs with percent-encoded non-ASCII characters are not redacted by the reused scrubber. *When:* For a home folder named `José`, a log URL containing `file:///C:/Users/Jos%C3%A9/x` matches neither the literal name nor the scrubber's special handling for `%20`, so the encoded name remains in a public report. **Do:** Match percent-encoded UTF-8 path components as well as literal names, with a test covering a non-ASCII Windows home folder.
Author
Contributor

@fix

The remaining name forms (L1–L3): scrub the original line before the game's rule so an encoded home folder is matched whole; accept 8.3 aliases with multi-digit suffixes; and match percent-encoded non-ASCII path components.

@fix The remaining name forms (L1–L3): scrub the original line before the game's rule so an encoded home folder is matched whole; accept 8.3 aliases with multi-digit suffixes; and match percent-encoded non-ASCII path components.
Author
Contributor

Superseded by main's redaction rework: Who now reads the home's real 8.3 short name from the OS (GetShortPathNameW) and redacts it, handling the short-name case more robustly than this PR's approach (which reused build_report::scrub against the old Who). The one form main's new matcher still misses — a name percent-encoded in a file:// URL (John%20Doe, josé as %C3%A9) — is the focused follow-up #3184, against the new code.

Superseded by main's redaction rework: Who now reads the home's real 8.3 short name from the OS (GetShortPathNameW) and redacts it, handling the short-name case more robustly than this PR's approach (which reused build_report::scrub against the old Who). The one form main's new matcher still misses — a name percent-encoded in a file:// URL (John%20Doe, josé as %C3%A9) — is the focused follow-up #3184, against the new code.
PedroRossi closed this pull request 2026-12-04 16:43:58 +00:00
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
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

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!3035
No description provided.