mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-29 04:46:50 -06:00
Plugins: refuse file and network access through path params and collab (#723)
Plugins can no longer reach the disk or network through path parameters (variable.export/codeConnect.export/component.playground writes, codeConnect.import/variable.import reads) or through collab.* and window.*; found and fixed by @lucasmartins-ai, split out of #696.
This commit is contained in:
+5
-1
@@ -237,7 +237,11 @@ Whatever its manifest says, FigCraft refuses these calls (the plugin gets the re
|
||||
it can handle):
|
||||
|
||||
- files and the app: `file.*`, `app.*`, `pref.*`, `help.*`, `library.add`, `libraries.*`,
|
||||
`image.place` with a `path` (pass the image as base64 `data` instead), `view.theme*`;
|
||||
`image.place` with a `path` (pass the image as base64 `data` instead), `variable.export`,
|
||||
`codeConnect.export` and `component.playground` with a `path` (leave it out to get the result
|
||||
back), `codeConnect.import` with a `path` and `variable.import` with a file path instead of JSON,
|
||||
`window.*` (new windows open files), `view.theme*`;
|
||||
- live sessions and online files: `collab.*`;
|
||||
- other documents and the version history: `doc.*` and `version.*` (except `doc.list` and
|
||||
`version.list`);
|
||||
- the undo history and nesting: `edit.undo`, `edit.redo`, `edit.repeat`, `command.batch` (a run is
|
||||
|
||||
Reference in New Issue
Block a user