mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-24 10:27:00 -06:00
A document carries things the app acts on for whoever opens it. Three of them were taken as given. Prototype Open link and Dev Mode dev resources both reached the platform's opener with any scheme. In the web build the opener is window.open, so a saved document could run script in the app's own origin; on the desktop any scheme went to the system's handler. Both now pass through the new engine module `doc_urls`, which allows http, https and mailto and nothing else. It is an allow-list on purpose: a list of known-bad schemes is outgrown by every handler a platform adds. A figcraft:// invite link joined the session at once. The system hands the app whatever such link was followed, which may come from a page or a message, so the Join dialog now opens with the link filled in and the person confirms. A library link stored in a document was loaded from wherever it pointed. Only a path on this computer is followed now, so opening someone else's file cannot make the app contact their server (which on Windows would also send credentials). Tests: each change has one that fails without it, verified by reverting. The prototype test fires through an afterDelay trigger, since no click is needed, and keeps a positive case so a refusal cannot pass vacuously.
36 lines
1.1 KiB
TOML
36 lines
1.1 KiB
TOML
[package]
|
|
name = "figcraft-engine"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "FigCraft engine: sessions, undo history, the command registry every surface (UI, CLI, control channel, MCP) dispatches through, pointer tools, components and the Figma menu catalog"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
figcraft-geom = { workspace = true }
|
|
figcraft-color = { workspace = true }
|
|
figcraft-doc = { workspace = true }
|
|
figcraft-collab = { workspace = true }
|
|
figcraft-layout = { workspace = true }
|
|
figcraft-text = { workspace = true }
|
|
figcraft-pathops = { workspace = true }
|
|
figcraft-render = { workspace = true }
|
|
figcraft-format = { workspace = true }
|
|
figcraft-svg = { workspace = true }
|
|
figcraft-pdf = { workspace = true }
|
|
craft-docpath = { workspace = true }
|
|
figcraft-plugin = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
log = { workspace = true }
|
|
base64 = { workspace = true }
|
|
regex = { workspace = true }
|
|
web-time = "1.1.0"
|
|
|
|
[dev-dependencies]
|
|
wat = { workspace = true }
|
|
image = { workspace = true }
|