Skip to content

Sanitize output file names - #775

Merged
dwisiswant0 merged 1 commit into
devfrom
log-name-sanitize
Nov 2, 2026
Merged

dwisiswant0 merged 1 commit into
devfrom
log-name-sanitize

Conversation

@Mzack9999

Copy link
Copy Markdown
Member

Closes #774

Proposed changes

  • The Host value used in log file names keeps only [A-Za-z0-9._:-]; every other character (path separators included) becomes _.
  • The file logger refuses to write a file whose path is not directly inside the output folder.

Proof

New tests TestSaveRejectsNameOutsideFolder and TestStoreWriterKeepsFilesInLogFolder. pkg/logger and pkg/logger/file tests pass.

@dwisiswant0 dwisiswant0 linked an issue Nov 2, 2026 that may be closed by this pull request
@dwisiswant0
dwisiswant0 merged commit 0e877c6 into dev Nov 2, 2026
7 checks passed
@dwisiswant0
dwisiswant0 deleted the log-name-sanitize branch November 2, 2026 17:52
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.

Output file names use the Host header value as it is

2 participants