Repository navigation
fix(lock): locking clears the contact address, wipe code word and restore words fields - #45
Merged
Merged
Conversation
…tore words fields On lock the UI cleared search, PIN and password fields but kept what was typed into the add-contact field, the remote-wipe code word field and the twelve words on the restore screen. They stayed in the controllers (and on screen after unlocking) as long as the app ran (security assessment 2026-11-23, SEC-M5). _raeumeOberflaecheAuf now clears these too. The message draft is kept on purpose, so an auto-lock after a short pause does not cost a half-written message. Dart strings cannot be overwritten; this only drops the references. 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-M5 from the external security assessment of 16–23 Nov 2026 ("app password and chat text remain in memory after lock"), as far as the app can.
What the code shows
On lock,
AppState.sperreWiederalready drops histories, contacts, groups, search results, previews and the fresh phrase; the core closes the database and zeroes the attachment and device-info keys; the UI clears search, PIN and both password fields. Not cleared were the add-contact field (addCtl), the remote-wipe code word field (codeCtl) and the restore screen's twelve words (phraseCtl). They stayed in their controllers, and on screen after unlocking.Fix
_raeumeOberflaecheAuf(lock and wipe) now clears these three as well.Limits (stated in the code)
draftCtl) is kept on purpose, so an auto-lock after a minute's pause does not cost a half-written message. Whether a draft should be dropped on lock is a decision for Henrik.Test
test/oberflaeche/sperre_oberflaeche_test.dart(SEC-M5): type an address into the add-contact field, lock with an app password, unlock, and the field is empty. Atorigin/mainit fails ("die Eingabe ueberlebte das Sperren…"); on this branch it passes.Run in CT 107:
flutter analyzeshows only the 29 existing hints;test/oberflaecheandtest/lock: 369 green.🤖 Generated with Claude Code