Skip to content

fix: sanitize large-file warning paths - #200

Merged
luojiyin1987 merged 1 commit into
masterfrom
fix/sanitize-large-file-warning
Oct 14, 2026
Merged

luojiyin1987 merged 1 commit into
masterfrom
fix/sanitize-large-file-warning

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor

What changed

Sanitize the file path before printing a large-file warning.
Keep the original path for file filtering.
Add a test with a newline and ANSI escape sequences in the file name.

Why

A file name can add forged lines or terminal control codes to the warning.

Verification

  • npm run lint passed.
  • npm test -- --runInBand passed: 26 suites and 227 tests.
  • git diff --check passed.

Redactions

No sensitive data was included.

@luojiyin1987
luojiyin1987 merged commit 62e8445 into master Oct 14, 2026
6 checks passed
@luojiyin1987
luojiyin1987 deleted the fix/sanitize-large-file-warning branch October 14, 2026 15:50
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.

1 participant