Skip to content

fix!: prevent path traversal in FilenameSchema#25

Open
karaposu wants to merge 1 commit into
brightdata:devfrom
karaposu:dev
Open

fix!: prevent path traversal in FilenameSchema#25
karaposu wants to merge 1 commit into
brightdata:devfrom
karaposu:dev

Conversation

@karaposu
Copy link
Copy Markdown
Contributor

Basename filenames before stripping reserved chars so "../" and absolute paths can't escape cwd via saveResults / SnapshotAPI.download.

BREAKING CHANGE: filenames passed to saveResults and snapshot download are now reduced to their final path segment. Callers relying on nested subdirectory paths (e.g. "output/data.json") will now write to the basename only ("data.json") in the working directory.

Basename filenames before stripping reserved chars so "../" and absolute
paths can't escape cwd via saveResults / SnapshotAPI.download.

BREAKING CHANGE: filenames passed to saveResults and snapshot download
are now reduced to their final path segment. Callers relying on nested
subdirectory paths (e.g. "output/data.json") will now write to the
basename only ("data.json") in the working directory.
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