mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-17 05:40:26 +01:00
Settle that HTML writes a URL as the ADF holds it, a scheme filter left for a later security addition
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
|
||||
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 142 | 0.3.0 | | security | **Settle in `docs/decisions.md`, weighing the pros and cons with the maintainer, whether `adfToHtml` writes a `javascript:`, `vbscript:`, `file:` or non-image `data:` URL as the ADF holds it, in a link's `href`, an image's `src` and each link the carry element shows.** | 2 | 2 | 2 | 4 | 3 | 6 by 3 | 4.5 |
|
||||
| 131 | 0.3.0 | | | **Ship `htmlToAdf`, reading back exactly what `adfToHtml` writes and refusing any other HTML as `unmappable-html`.** | 4 | 1 | 2 | 5 | 7 | 3 by 3 | 0.6 |
|
||||
| 133 | 0.3.0 | 131 | decision | **Write mentions, emoji, dates, statuses and inline cards as semantic HTML in `adfToHtml` and read them back in `htmlToAdf`, in place of the carry element.** | 2 | 2 | 2 | 4 | 4 | 6 by 3 | 3.0 |
|
||||
| 132 | 0.3.0 | 131 | | **Write tables as `<table>` in `adfToHtml` and read them back in `htmlToAdf`, in place of the carry element.** | 2 | 2 | 2 | 4 | 5 | 6 by 4 | 2.4 |
|
||||
@@ -65,24 +64,6 @@
|
||||
|
||||
## Details
|
||||
|
||||
### 142. Settle in `docs/decisions.md`, weighing the pros and cons with the maintainer, whether `adfToHtml` writes a `javascript:`, `vbscript:`, `file:` or non-image `data:` URL as the ADF holds it, in a link's `href`, an image's `src` and each link the carry element shows.
|
||||
|
||||
The exposure: ADF from an author a consumer does not trust can hold a `javascript:…` URL in a
|
||||
link's `href`, an external image's `url`, or a card's `url` or `data.url`. `adfToHtml` writes it as
|
||||
held into a link's `href` or an image's `src`, and into the `href` of each link the carry element
|
||||
shows: a carried node's link mark, a card and an external image (`docs/decisions.md` §HTML writes a
|
||||
URL as the ADF holds it, whatever its scheme). An export tool showing that HTML unsanitized in a
|
||||
browser runs the script when a reader follows the link.
|
||||
|
||||
Weigh writing the URL as held, leaving sanitizing to the consumer as for any HTML, against keeping
|
||||
it in `data-adf` alone. Carrying the node no longer does that, since the carry element links what
|
||||
it shows: the carry would also have to show such a link without its `href`. cmark, the CommonMark
|
||||
reference implementation, leaves `javascript:`, `vbscript:`, `file:` and `data:` other than a PNG,
|
||||
GIF, JPEG or WebP image out of its HTML by default; a browser reads a scheme after dropping tabs,
|
||||
line breaks and leading control characters. Say whether the markdown writers' links follow the
|
||||
same rule. Ask the maintainer with the pros and cons, and record the answer in place of that
|
||||
decision.
|
||||
|
||||
### 131. Ship `htmlToAdf`, reading back exactly what `adfToHtml` writes and refusing any other HTML as `unmappable-html`.
|
||||
|
||||
A hand-written HTML tokenizer, linear in the input, its nesting bounded (`docs/decisions.md`
|
||||
|
||||
Reference in New Issue
Block a user