Skip to content

fix(files): reject fileData with a blob: src - #103

Merged
buzz-code merged 1 commit into
mainfrom
claude/project-thread-5fteae
Nov 17, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/project-thread-5fteae

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Requested by הדסה · project thread

Fixes buzz-code/ops#72

Problem

A blob: URL is local to the uploading browser tab. If the client sends one as fileData.src (a save before the file finished reading), the server stores it and the file is lost.

Fix

  • New utils/validation/is-not-blob-file.ts IsNotBlobFile validator: fails when value.src starts with blob:, with a clear Hebrew message asking to pick the file again.
  • Applied with { always: true } on fileData in UploadedFile and Image.
  • Client-side root-cause fix: buzz-code/nra-client (same branch name).

Tests

  • utils/validation/__tests__/is-not-blob-file.spec.ts (new). utils/validation + entities suites pass.
  • Full suite: 5 suites fail with No metadata for "User". These fail the same way on main when run outside the server/shared layout, so they are unrelated.

Additive, no consumer action needed.


Generated by Claude Code

A blob: URL is local to the uploading browser tab; storing it loses the
file. Add IsNotBlobFile validator on Image and UploadedFile fileData.

Fixes buzz-code/ops#72

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GTicqUJeC3ZKmNLvMo6hy
@buzz-code
buzz-code merged commit 4c08301 into main Nov 17, 2026
1 check 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