Skip to content

fix: reject conflicting file selectors - #156

Open
infosbighouse-glitch wants to merge 3 commits into
tscircuit:mainfrom
infosbighouse-glitch:fix/reject-conflicting-file-selectors
Open

infosbighouse-glitch wants to merge 3 commits into
tscircuit:mainfrom
infosbighouse-glitch:fix/reject-conflicting-file-selectors

Conversation

@infosbighouse-glitch

Copy link
Copy Markdown

Summary

Prevent ambiguous file lookups when a request supplies a file_id for one file together with a file_path for another.

Previously, the database lookup used OR semantics, so /files/get and /files/download could return whichever matching record appeared first. The routes now reject conflicting selectors with HTTP 400.

Changes

  • reject simultaneous file_id + file_path in /files/get
  • reject simultaneous file_id + file_path in /files/download
  • add focused regression coverage using two distinct files

Verification

No project dependencies were installed or executed on the contributor machine. The patch is intentionally small and includes repository-native Bun regression coverage for CI to run remotely.

Closes part of #5

/claim #5

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