Repository navigation
fix(files): reject fileData with a blob: src - #103
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 asfileData.src(a save before the file finished reading), the server stores it and the file is lost.Fix
utils/validation/is-not-blob-file.tsIsNotBlobFilevalidator: fails whenvalue.srcstarts withblob:, with a clear Hebrew message asking to pick the file again.{ always: true }onfileDatainUploadedFileandImage.Tests
utils/validation/__tests__/is-not-blob-file.spec.ts(new).utils/validation+entitiessuites pass.No metadata for "User". These fail the same way onmainwhen run outside theserver/sharedlayout, so they are unrelated.Additive, no consumer action needed.
Generated by Claude Code