mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-16 15:22:43 +00:00
Plug-in Library: a file URL cannot name a network path
A local catalog's file:// URLs were decoded into a path without checking how the path starts. A URL such as file:////server/share/x.wasm, or one whose path holds a backslash or a percent-encoded / or \, could become a network path on Windows, so reading the catalog or a release named in it contacted that host. file_url_path now refuses a decoded path that starts with two separators or holds a backslash, and a percent-encoded / or \, with an error that names the reason. Local paths and drive-letter paths are read as before. The library.refresh params text, docs/plugins.md and docs/publishing-plugins.md say so.
This commit is contained in:
1 parent
3102b6e632
commit
55dc4a6d9e
3 files changed
+72
-15
No files matched your search
+2
-1
@@ -369,7 +369,8 @@ package can't read files, open the network or crash the app.
|
||||
[`storytold/effectcraft-plugins`](https://github.com/storytold/effectcraft-plugins) repository;
|
||||
packages are added by pull request and reviewed there. The app has no field for another
|
||||
catalog; `library.refresh {catalog}` (for plug-in authors testing an entry) takes an `index.json`
|
||||
on GitHub or a local file, and the page then says it shows a test catalog until Refresh.
|
||||
on GitHub or a local file, and the page then says it shows a test catalog until Refresh. A file
|
||||
URL that names a network path (`file:////server/share/…`) is refused.
|
||||
* **Nothing is downloaded until you ask.** Fetch Catalog (`library.refresh`) reads the catalog;
|
||||
Install (`library.install`) downloads the package's `.wasm`, checks its SHA-256 (and its size, when the
|
||||
catalog gives one) against the catalog and loads it. Downloads use the system's `curl`,
|
||||
|
||||
Reference in new issue
Block a user