Strip private metadata from mobile photo evidence before storage #949

Closed
opened 2026-08-16 07:49:29 +00:00 by timmy · 0 comments
Owner

Problem

Mobile camera and gallery evidence that is already under the size and pixel limits bypasses canvas re-encoding. The original JPEG/PNG/WebP bytes can therefore retain EXIF GPS, device, timestamp, and authoring metadata when persisted to a draft/outbox or uploaded.

Evidence on origin/main (00fd96f): frontend/issue-evidence-review.js returns the original file at the bounded fast path, while all mounted issue and conversation photo composers use this optimizer before persistence/upload. Searches across all historical issue titles/bodies and recent commits found no metadata-sanitization work.

Acceptance criteria

  • Every newly selected PNG, JPEG, or WebP is decoded and re-encoded before preview, durable serialization, or upload, even when already within limits.
  • The sanitized derivative preserves filename/type and existing byte/pixel bounds.
  • Decode/encode failure rejects selection; original bytes never become selected state.
  • Existing New issue and issue/PR/Updates conversation photo flows inherit the behavior through the shared optimizer.
  • Behavioral tests prove bounded originals are replaced by canvas output and failure remains fail-closed.
## Problem Mobile camera and gallery evidence that is already under the size and pixel limits bypasses canvas re-encoding. The original JPEG/PNG/WebP bytes can therefore retain EXIF GPS, device, timestamp, and authoring metadata when persisted to a draft/outbox or uploaded. Evidence on `origin/main` (`00fd96f`): `frontend/issue-evidence-review.js` returns the original file at the bounded fast path, while all mounted issue and conversation photo composers use this optimizer before persistence/upload. Searches across all historical issue titles/bodies and recent commits found no metadata-sanitization work. ## Acceptance criteria - Every newly selected PNG, JPEG, or WebP is decoded and re-encoded before preview, durable serialization, or upload, even when already within limits. - The sanitized derivative preserves filename/type and existing byte/pixel bounds. - Decode/encode failure rejects selection; original bytes never become selected state. - Existing New issue and issue/PR/Updates conversation photo flows inherit the behavior through the shared optimizer. - Behavioral tests prove bounded originals are replaced by canvas output and failure remains fail-closed.
timmy self-assigned this 2026-08-16 07:49:29 +00:00
timmy closed this issue 2026-08-16 07:58:42 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#949
No description provided.