chore(memory): V1-2.2 finalisation, A6 scope, BDR-088, LRN-101, floor wording

This commit is contained in:
bchanot committed 2026-10-30 15:05:56 +01:00
1 parent 7d9ab8cf2f
commit f976f33307
5 files changed
+47 -1

No files matched your search

+11
View File
@@ -691,3 +691,14 @@ Also: the tree drops processing instructions and comments, so "read with no remo
**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]].
- **Status (2026-10-30)**: superseded by LRN-101
## LRN-101 — SVG local references: one strict grammar, reader and composer agree by construction (2026-10-30)
**Context**: V1-2.2 security round 17d9199: `url(#%61)`, Chromium `url('#<TAB>a')` passed dangling check, per-view scoping, expansion budget; browsers resolved them. Fixed a678faa (`sanitize::local_url_target`), f1ef6a4 (entity spellings, composer coarse `url(` count). Final review 2026-10-30: composer count also saw glued `xurl(#a)` reader kept in `class`/`result`/`values` → verdict passed, canvas refused `unscoped_reference`, PDF drew. Fixed by `sanitize::urls_unglued` (reader removes any attribute holding a `url(` `url_openings` does not read). Supersedes LRN-100.
**Pattern**: one strict grammar for local references (`href`, `xlink:href`, `url(#id)`), same reading in cleaning, validation (reader, verdict, preview, PDF snapshot gate), composition, browsers. Non-strict `url(` (`%XX`, entity, tab/space/unbalanced quote inside, empty or non-ASCII id, backslash) = active content, file refused. `url(` glued to longer name = attribute removed, any attribute. Reader keeps only values whose every `url(` is a strict reference → composer check true by construction.
**Trap**: independent defence-in-depth check must agree with reader on what reader keeps; else fail-closed check becomes availability bug. Every fail-closed branch needs a test reaching it (tree built outside reader).
**Future application**: new SVG/CSS consumer reuses `url_openings`/`local_url_target`, never own parser. Hostile tests written apart from reader, assert browser behaviour.
Supersedes [[LRN-100]].