ALPQ

A Little Picture Quietly

DRAFT 0.12026-11-01ALPQ Lab spec · draft for comment

Written for GOVW's own use and published openly: take what's useful, and tell us what's wrong.

Anything a stranger types into a form will one day be read by someone on the inside: a volunteer, an operator, a director. This draft makes sure that what they read can't act. The text is cleaned, its links are broken, and it is redrawn from scratch as a small picture. There's nothing in it to click, copy or run.

Status: a draft for review, not a standard. Running: the GOVW operations dashboard uses it for every message from the public. Honest scope: it protects the person reading. It doesn't judge whether the message is true, and a determined reader can still retype what they see.

1Terms

2The five rules

  1. Clean. Implementations MUST normalize the text (Unicode NFKC) and remove invisible, direction-flipping and control characters. They MUST cap its length.
  2. Defang. Links, addresses and commands MUST be broken before display: hxxps[:]//example[.]com, name [at] example[.]org.
  3. Redraw. Untrusted text MUST NOT reach the page as text. It MUST be typeset again, character by character, into a picture made by the server, and shown only inside <img>, never inline.
  4. Lock the page. The page SHOULD load nothing from elsewhere, refuse to be framed, store nothing, and offer no action that sends, changes or deletes.
  5. Quiet alerts. Texts and emails about new messages MUST use fixed wording and a link. They MUST NOT quote what the stranger wrote.

3The picture

The server places each character in an SVG <text> element after replacing the five XML special characters (& < > " '). Lines are wrapped by character count; long input is cut with an ellipsis. Labels such as "Name" or "Message" are written by the server, never by the sender. The picture is delivered as a data:image/svg+xml URI inside <img>. In that context browsers run no scripts, load no external resources and don't let the words be selected.

A typical card is under 2 KB, about a tenth of the same card as a PNG, and stays sharp at any zoom.

4Security considerations

5Alignment with other standards

Redrawing untrusted text as a picture is ALPQ's own addition. We know of no standard that requires it.

6Known gaps and questions

7Changes

8References