S063: web pages can't open nacre:// pages; the passwords page asks on every open and isn't kept in the session
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
bf29afb90f
commit
583a92b854
1 changed files with 273 additions and 24 deletions
|
|
@ -498,6 +498,15 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
|
|||
- Measured (hidden, 5 http tabs, tab 0 active, `NACRE_REST_UNIT_SECS=2`, discard 4 = 8 s; WebKitWebProcess of that run, summed `smaps_rollup` Pss, sampled every 2 s): all tabs open 15 processes / 774 MB; ~10 s after the hidden four unloaded 6 processes / 329 MB, settling at 295 MB. Unloading frees the web processes and their memory (no shared process or lingering view ref found); the 6 left include the active tab's and WebKit's spare ones. Both `has_web` expects false.
|
||||
- Not done: no visible run.
|
||||
|
||||
## S063 — nacre:// pages locked down; passwords ask on every open (2026-11-18)
|
||||
- Rule (D-049): `tabs::web_may_open` — web content never goes to `nacre://` (only `nacre://allowcert`, taken from the tab showing the certificate warning). Enforced in the engine's `decide-policy` for every navigation and new-window action (`engine/host.rs`, one `… denied: web pages can't open Nacre's pages` line), with backstops in `App::on_navigation` (no longer turns a page's `nacre://` navigation into `tab.page`), `on_create_new` (closes such a pop-up) and the page context menu's link items. Nacre's own pages, menus, address bar and bookmarks go through `Command::Open`/`ShowPage`, untouched.
|
||||
- Passwords: the page asks every time it is shown (master password via `check_password` while the store is unlocked for filling; a "Show passwords" click in device mode, which has no password). A frame drawn without the page (`passwords_shown`, as S059's `capture_shown`) calls `PageState::close_passwords`: answer forgotten, revealed/edit/search/generator/master fields and egui's text edit states cleared.
|
||||
- Session: `session::kept_url` saves and restores `nacre://passwords` as a new tab (title blank).
|
||||
- Tests: `web_content_cannot_open_internal_pages`, `passwords_page_not_kept`; `tests/smoke/nacre-lock.txt` + `pages/nacre-lock.html`, `nacre-refresh.html`, server.py `/to-nacre` (302): link, middle click, `target=_blank`, `window.open` (click and script), `location=`, iframe, meta refresh, HTTP redirect all denied (12 log lines, tab count 1, page null); address bar → asks; another tab and back → asks; History and back → asks; master password set → asks. Status `lifecycle.passwords_open`.
|
||||
- Verified: hidden `nacre-lock.txt` exit 0 (server.py running), shots read; session.json of the run has `nacre://newtab` for the passwords tab; `cargo test` 91 + webext 1.
|
||||
- Not done: typing the master password into the gate isn't scripted (selftest has no egui text input), only the click path and the gate staying shut; window minimised (no frames) keeps the page open until it is drawn without it; no visible run.
|
||||
- Decision for device mode (no master password, nothing to ask): a click gate, so no page can open it unseen; the orchestrator/user may want "set a master password" pushed harder.
|
||||
|
||||
## Later
|
||||
- A link followed inside a frame still goes through the tab's navigation policy (WebKit's GTK API has no frame info; S050).
|
||||
- file:// media outside the XDG user folders doesn't play (WebKit sandbox, D-043).
|
||||
|
|
|
|||
Loading…
Reference in a new issue