Repository navigation
fix(attachments): ask before sending a file whose metadata BitDM cannot remove - #44
Merged
Merged
Conversation
…ot remove Only JPEG, PNG, WebP, HEIC/AVIF and MP4/MOV are cleaned. PDF, Office/ODF and other ZIP files, GIF, TIFF (with GPS), MP3, Matroska/WebM, Ogg, FLAC, WAV/AVI and unknown ISO brands such as M4A went out with all metadata and their original name, without a word (security assessment 2026-11-23, SEC-M3). traegtUnentfernteMetadaten() recognises these by their first bytes. Sending one now asks the same "Send it anyway?" question as an image that could not be cleaned, with its own text naming what goes along (author, software, times, sometimes location, file name). The file name is kept: for a document it is usually wanted. Voice messages are excluded as before; files without a known signature are not asked about. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.


Addresses SEC-M3 from the external security assessment of 16–23 Nov 2026: "GIF, TIFF (incl. GPS), MKV, WebM, PDF, Office, MP3 keep all metadata and original filename with no warning".
Confirmed
bereinigehandles JPEG, PNG, WebP and ISO-BMFF (HEIC/AVIF, MP4/MOV/3GP/M4V). Everything else returnsNichtUnterstuetzt, andAppState._ohneMetadatenthen sends the file unchanged, under its original name, without a question. The metadata header comment calls this a "known limit, not a promise", but the user was never told.Fix
traegtUnentfernteMetadaten()recognises, by the first bytes (not the extension): PDF, ZIP (docx/xlsx/pptx/odt…), GIF, TIFF (II/MM), MP3 (ID3 and frame sync), Matroska/WebM, Ogg, FLAC, RIFF (WAV/AVI; WebP stays cleaned) and ISO files with a brandbereinigedoes not know (e.g. M4A).metaKept): author, software, times, sometimes location, and the file name go along. Without a UI to ask, the file is not sent, the same rule as for images that cannot be cleaned.Tests
test/anhang/metadaten_test.dart: each format above is recognised; JPEG/WebP (cleaned) and plain text are not.test/oberflaeche/sperre_zustand_test.dart: a PDF triggers the question; No sends nothing, Yes sends it under its name; without a question it is not sent; raw data without a signature goes out without a question.Run in CT 107:
flutter analyzeshows only the 29 existing hints;test/anhang,test/oberflaeche,test/core: 528 green.Open (decision)
This asks for every such file, which is real friction for people who send many PDFs. Alternatives: ask once per format, or a setting. Actually stripping more formats (TIFF/GIF/PDF info dictionaries) would be a separate piece of work.
🤖 Generated with Claude Code