chore(memory): V1-2.2 owner decisions, BDR-087, LRN-100, final review

This commit is contained in:
bchanot committed 2026-10-30 12:50:01 +01:00
1 parent 05de816962
commit 98060d74a3
3 files changed
+31

No files matched your search

+18
View File
@@ -673,3 +673,21 @@ Real vector exports vs R3 allowlist: cairo 1.18 writes colours as `rgb(20%, 40%,
Apply: classify fixtures by actual outcome before writing expectations; report colour loss on cleaning as an owner decision (allow numeric rgb()/rgba() = reader change); dedupe attribute names in generators.
Also: the tree drops processing instructions and comments, so "read with no removal" is not "bytes safe": `<?xml-stylesheet href=…?>` survives in stored bytes; scan PIs separately (fail-closed) wherever original bytes are kept.
## LRN-099 — SVG local references: one strict grammar shared by every stage (2026-10-30)
**Context**: V1-2.2 security round on 17d9199: `url(#%61)` and Chromium `url('#<TAB>a')` passed dangling check, per-view scoping, expansion budget; browsers (Chromium 1248, Firefox 1555) resolved them. Root cause: reader, cleaner, composer each tolerated spellings browser normalises differently. Fixed a678faa (`sanitize::local_url_target`), f1ef6a4 (`&#9;` `&#10;` `&#13;` spellings, composer coarse `url(` count sharing no parser).
**Pattern**: one strict grammar for local references (`href`, `xlink:href`, `url(#id)`), shared by cleaning, validation (reader, verdict, preview, PDF snapshot gate), composition. Any encoded or ambiguous spelling (`%XX`, entity, tab/space/unbalanced quote inside, empty or non-ASCII id, `url(` glued to longer name) = active content, refused, never normalised. Composer check fail-closed, independent of reader parser.
**Future application**: any new SVG/CSS consumer (editor page, PDF, preview, V1-2.5/2.6) reuses the grammar, never its own parser. Hostile tests written apart from the reader, asserting browser behaviour, not core behaviour.
- **Status (2026-10-30)**: superseded by LRN-100
## LRN-100 — SVG local references: one strict grammar, same reading in every stage (2026-10-30)
**Context**: V1-2.2 security round on 17d9199: `url(#%61)` and Chromium `url('#<TAB>a')` passed dangling check, per-view scoping, expansion budget; browsers (Chromium 1248, Firefox 1555) resolved them. Root cause: stages tolerated spellings browser normalises differently. Fixed a678faa (`sanitize::local_url_target`), f1ef6a4 (`&#9;` `&#10;` `&#13;` spellings, composer coarse `url(` count). Supersedes LRN-099 (wrong on glued names).
**Pattern**: one strict grammar for local references (`href`, `xlink:href`, `url(#id)`), same interpretation in cleaning, validation (reader, verdict, preview, PDF snapshot gate), composition, browsers. Non-strict `url(` spelling (`%XX`, entity, tab/space/unbalanced quote inside, empty or non-ASCII id) = active content, refused, never normalised. `url(` glued to longer name = another function (removed in CSS attrs, kept elsewhere), not a reference.
**Trap**: independent check must share grammar rules, not just avoid parser. f1ef6a4 composer count treats glued `xurl(` as reference → reader accepts, verdict passes, `view.canvas` refuses `unscoped_reference`, PDF draws (final review 2026-10-30, LOW, availability only).
**Future application**: new SVG/CSS consumer reuses grammar. Hostile tests written apart from reader, asserting browser behaviour; every fail-closed branch gets a test reaching it.
Supersedes [[LRN-099]].