Skip to content

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

Merged
danny-avila merged 1 commit into
LibreChat-AI:mainfrom
fallintoplace:fix/runner-reject-nul-paths
Sep 2, 2026
Merged

fix(runner): reject NUL bytes in file paths#46
danny-avila merged 1 commit into
LibreChat-AI:mainfrom
fallintoplace:fix/runner-reject-nul-paths

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T02:20:58.088832Z bf703b6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: bf703b6c29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila merged commit b43d127 into LibreChat-AI:main Sep 2, 2026
6 checks passed
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.

2 participants