Skip to content

fix(remote-wipe): the code word is blacked out in the trusted contact's history - #48

Merged
Henner4746 merged 1 commit into
mainfrom
fix/codewort-geschwaerzt
Nov 30, 2026
Merged

Henner4746 merged 1 commit into
mainfrom
fix/codewort-geschwaerzt

Conversation

@Henner4746

Copy link
Copy Markdown
Owner

Addresses SEC-M8 from the external security assessment of 16–23 Nov 2026: "The wipe code word remains readable in the trusted contact's chat history."

Confirmed (for the code word, not for /wipe)

  • /wipe sends a control payload and stores nothing.
  • The code word is typed by the trusted contact as an ordinary message (that is the point: no special UI on their phone). The owner's app swallows it (_istFernCodewort) and acknowledges it, but on the contact's side it stays in the history in plain text, readable by anyone holding that phone. The sender's app cannot recognise it, because only a salted hash is kept on the owner's side.

Fix

  • When the owner's app swallows the code word, its delivery receipt carries the text tilgen (Payload.quittungTilgen; Payload.control gained an optional text).
  • The contact's app then blacks the message out (••••••), the same way it already does for the shares of the trust backup (geheim). Each of the contact's devices gets the receipt and blacks it out.
  • Older apps ignore the text of a receipt and acknowledge as before; a receipt with text was already valid in the payload format.

Test

test/net/codewort_geschwaerzt_test.dart (real relay): Anna sets a code word and trusts Bob; Bob sends it. Afterwards it is •••••• in Bob's history, Anna counted the request and has nothing in her history, and an ordinary message from Bob stays readable. At origin/main it fails (the code word stays in plain text); on this branch it passes.

Run in CT 107: flutter analyze shows only the 29 existing hints; with fern_codewort_test, fernloeschung_test, protokoll_befunde_test, relay_end_to_end_test, payload_neue_arten_test and fernloeschung_ui_test: 65 green.

Not covered

Until the receipt arrives (owner offline), the text is visible on the contact's phone. A notification shown on the contact's side is not affected.

🤖 Generated with Claude Code

…'s history

A trusted contact sends the remote-wipe code word as an ordinary message.
The owner's app swallows it and counts it as a wipe request, but on the
contact's side it stayed in the history in plain text, readable by anyone
holding that phone (security assessment 2026-11-23, SEC-M8).

The delivery receipt for a swallowed code word now carries the text
"tilgen". On receiving it, the contact's app blacks out that message
("••••••"), the same way it already does for the shares of the trust
backup. Older apps ignore the receipt text and acknowledge as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Henner4746 Henner4746 mentioned this pull request Nov 30, 2026
@Henner4746
Henner4746 merged commit 9e1af23 into main Nov 30, 2026
11 of 12 checks 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.

1 participant