A document can forge both a console message and its source (KaTeX's \errmessage, data: scripts, sourceURL, encoded paths), so the display handler logs a line number and nothing the page wrote. The page's own diagnostics reach the app over elyQuery: a missed reveal sends its line; the visual failure and diagram lines already did. A test calls the real handler and checks the captured log. Round 5 found only the missing test; it is added and mutation-checked, with no sixth review under the five-round cap. M-15 is new: the print page runs a document's scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 lines
1.2 KiB
Markdown
4 lines
1.2 KiB
Markdown
FAIL
|
|
|
|
- crates/ely-web-content/src/handlers.rs:274 — Console `source` can contain document text, so withholding `_message` does not satisfy PRD §18.2 or agents.md rule 4. Open Markdown containing `<div><script src="data:text/javascript,console.warn('M11_PRIVATE_DOCUMENT_SENTINEL')"></script></div>` and print or export PDF: the real page's HTML renderer preserves this script, the staged page executes it (`export.rs`'s `render_pdf`/`print_page`; the resource fence permits `data:`), and CEF supplies the entire data URL as `source`. The unchanged display handler logs `web: the page warned at data:text/javascript,console.warn('M11_PRIVATE_DOCUMENT_SENTINEL'):1`. Reproduced with the freshly built page and native CEF on both Windows and WSL; the assertion excluding the document marker fails on both. The previous KaTeX prefix leak is fixed, but this source-field leak remains untested by the repository tests. Evidence: `.work/m11-r2/windows-cef-source.log`, `.work/m11-r2/linux-cef-source.log`, and `.work/m11-r2/evidence.log`. Fix direction: omit arbitrary console source strings or reduce them to validated, trusted diagnostic identifiers; add a regression that asserts document text cannot reach logs through either console message or source fields.
|