Commit Graph
5 Commits
Author SHA1 Message Date
FredApps 583a8a02db Merge pull request #3147 from dotCooCoo/fix/plugin-library-file-url-unc
Plug-in Library: a file URL cannot name a network path
2026-11-16 10:26:13 +01:00
dotCooCoo 5dfcadd09b Plug-in Library: a package with an unreadable repo URL downloads nothing
When a package names a `repo` that isn't a GitHub repository URL
(`https://github.com/<owner>/<repo>`, a trailing `/` or `.git` allowed, or
a folder in one, `.../tree/<ref>/<path>`), Install, Update and Preview now
refuse its release URLs with an error naming the package. Before, such a
`repo` skipped the repository check and any GitHub release asset was
downloaded. A package without a `repo` keeps any repository's release
asset.

The example catalog's schema now holds `repo` and release `url` to the
same forms, and `scripts/validate.sh` checks that every release is an
asset of the package's `repo` before it downloads anything.
2026-11-05 23:40:33 -08:00
dotCooCoo 75fed052e3 Plug-in Library: a package downloads only release assets of its repository
A catalog release's url was checked only for its host: any https:// URL
on GitHub's hosts was downloaded, from any repository and any path,
including a raw file on a branch or a path with dot segments that curl
resolves to another repository.

library.install, library.update and library.preview now refuse a url
that isn't https://github.com/<owner>/<repo>/releases/download/<tag>/<file>.
When the package's repo is a https://github.com/<owner>/<repo> URL, the
asset must be in that repository (owner and name compared without case).
Dot segments, also percent-encoded, empty segments, backslashes, queries
and fragments are refused. file:// releases from a local catalog are
read as before, and the SHA-256 and size checks are unchanged.

A catalog other than the community one is still read only when
library.refresh names it (https:// on GitHub's hosts, or a local
file://). docs/plugins.md, docs/publishing-plugins.md and the
library.install params text describe the rules.
2026-11-05 21:51:04 -08:00
dotCooCoo 55dc4a6d9e 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.
2026-11-05 21:02:33 -08:00
4e8398f8ca G8: Plug-in Library: install, preview and update community WebAssembly effects (#2524)
* G8: plug-in library

Community Plug-in Library for WebAssembly effect plug-ins (#376): one
reviewed catalog (index.json), install / update / remove from Settings >
Plug-in Library (also Effect > Plug-in Library...), library.* commands,
start-up loading of installed packages with SHA-256 checks. Downloads go
through the system curl (https, GitHub hosts), as trained models do.

Preview before installing (library.preview): the release is downloaded,
checked like an install, and rendered in the sandbox on a built-in sample
frame at default settings (2 s at 12 fps) with a Before/After split, plus
the effect's parameters, "Open on GitHub" and an optional author video
link (catalog field preview.video). Authors need to do nothing for it.

Hardening: a module that fails to load leaves the installed copy alone,
Update All updates every package in one job, minApp also applies to an
explicit version, curl ignores ~/.curlrc and URL globbing, unique temp
files, percent-decoded file URLs. Plug-in effect slots grow from 64 to
256 with a clearer overflow error.

Docs: plugins.md "Plug-in Library", publishing-plugins.md (author guide
from zero to listed), gaps.md; examples/plugin-catalog is the starting
content of the catalog repository (schema, validation workflow).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* contributors: credit iseemhlyfta

* G8: plug-in library: doc comments on the library's functions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: plug-in catalog check: require one object with schema 1 and a packages array

An empty file or several JSON values passed jq empty, and with
SKIP_SCHEMA=1 nothing else checked the catalog's shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: plug-in library: one preview texture set; catalog schema requires effects

The preview kept a texture set per package version previewed (about
6 MB each) for the whole session; it now keeps one, replaced when
another package is previewed. Releases in the catalog schema must list
at least one effect id, as the author guide says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: plug-in catalog schema: effect ids follow the manifest's id rules

Letters, digits, '.', '_' and '-', and not the reserved 'ec.' prefix,
so library.missing can match them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: refuse Plug-in Library jobs while automation file access is confined

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: split the Plug-in Library page into toolbar, card, links and actions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: show Plug-in Library toasts without a Roto job; cache preview frame checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: log Plug-in Library packages that fail to load at start-up

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: check an update before replacing a loaded package; Update All past failures

- An update to a package that is already loaded is now compiled and its manifest checked
  (through the previewer, without registering it) before the new file is written and the old
  version's folder deleted. Before, a release with the right SHA-256 that didn't load replaced
  the working version and failed at the next start.
- Package ids that differ only in case, or end in a dot, would share one folder on Windows and
  macOS: the catalog keeps the first of them, and ids can't end in a dot (schema too).
- Update All: a package that can't be picked or installed no longer stops the others; the
  result names what was updated and what wasn't.
- Downloads: at most 5 redirects, and one that ends off GitHub's hosts is refused, as the module
  docs say.
- A job that panics no longer leaves the library busy; poisoned status locks are used, not
  dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* G8: rustfmt the update test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 05:51:17 +01:00