#532 Desktop: approve sign-ins knowingly, follow file links only where chosen, hold other sites' images, grant only the…
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#532
- pull request
- state:merged
Closes #505, closes #506, closes #507, closes #508, closes #509. **#506: desktop sign-in approval.** - **Which computer is asking:** the desktop sends the computer's name and system when it starts a sign-in. The approval page and email show them (new `device_name` / `device_platform` columns). - **Same network or not:** the old exact-address check is replaced by a network comparison: the same IPv4 address, the same IPv6 /64, or both loopback. - **A different or unknown network:** the page shows a warning and a checkbox. The server also refuses the approval (409) without `otherNetwork: true`. - **The code:** the page asks you to type the code from your own screen, and the desktop shows it as two groups of five. - **Policy:** PRIVACY.md describes the new fields, but its policy version is **not** bumped. **#507: which files a timeline may name.** In the new `src-tauri/src/access.rs`: - The thumbnail, Show in folder and open-file commands follow a file link only inside a chosen folder (one you populated from, or the open file's own folder), or in a timeline you trust. - **Checked twice:** first as written, before touching the disk, so there's no file-existence answer and no automount; then again after resolving symlinks, so a link can't escape a chosen folder. - `/net` and `/Network` are refused unless you populated from them. - **Trust** is asked in a native dialog and remembered per file in `access.json` (0600). **#509 and #505: images from other sites.** - **Desktop:** a timeline opened from a file holds back images from other sites until you choose "Show images from other sites". The choice is remembered per file. - **Website:** the profile avatar now sends no referrer, like every other image already did. - **Docs:** `images.md` explains what loading an image tells its host. **#508: desktop window permissions.** - `build.rs` declares the app's 25 commands, and the capability grants only those. `core:default` is dropped, so no Tauri or plugin API is reachable from the page. - **Isolation pattern not adopted:** it adds nothing over this allowlist, since a compromised page would send the same calls the page itself sends. - **`withGlobalTauri` kept:** turning it off removes nothing. - `docs/architecture.md` explains all three decisions. **Tests:** - **New:** `test/desktop-commands.test.mjs`, and `test/desktop-access.mjs` in the real app under tauri-driver, with a CI step. - **Passing locally:** cargo tests, typecheck, unit tests, the PostgreSQL and device-approval live tests, the browser tests and the desktop tests. - **Not run:** the macOS and Windows code paths. **Conflicts with #526**, in `main.rs`, `app.ts`, `populate-browser.mjs`, `src-tauri/src/README.md` and `file-populator.md`. I'll resolve them after #526 merges: drop #526's page-supplied `trusted` argument in favour of Rust's own trust, and use the native dialog. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/532
Related
- #505 Viewers load timeline images from hosts the author chooses
- #506 Desktop sign-in approval relies on the user noticing a warning (device-code phishing)
- #507 Security hardening: the desktop page can make the app touch any local path
- #508 Security hardening: Tauri isolation pattern instead of withGlobalTauri
- #509 Opening an untrusted timeline in the desktop app loads images from hosts it names
- #526 Harden the desktop app and the .och store against untrusted files
- #535 Raise the policy version for the 7 November privacy policy
- Merge pull request #532 from openchronology/security/desktop-images-and-approval