Skip to content

fix(runner): reject NUL bytes in file paths - #46

Open
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix/runner-reject-nul-paths
Open

fix(runner): reject NUL bytes in file paths#46
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix/runner-reject-nul-paths

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 8, 2026

Copy link
Copy Markdown

Summary

Reject file names containing NUL bytes in validateFilePath().

Why

A request can currently include a name such as result\0.csv. It passes the existing relative path, canonical path, and shape checks, but Node rejects it later when the runner calls the filesystem. That turns invalid user input into a late filesystem error. Returning ValidationError at the validation boundary keeps the failure predictable and avoids sending malformed paths deeper into the runner.

This is a validation and error-handling fix. It does not change normal file names or the existing path traversal rules.

Tests

  • bun test api/src/validation.test.ts

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