mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-16 15:22:43 +00:00
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.
This commit is contained in:
1 parent
3102b6e632
commit
75fed052e3
4 files changed
+134
-4
No files matched your search
@@ -193,7 +193,7 @@ Release fields (one per entry in `versions`):
|
||||
| `version` | yes | Dotted numbers only, at most 32 characters: `1.0.0`, `1.2`. No `v` and no suffixes such as `-beta`. |
|
||||
| `api` | yes | The plug-in API the module implements: `1`. |
|
||||
| `minApp` | no | The oldest EffectCraft version the release needs (`0.17.0`). Leave it out if any version with this API works. |
|
||||
| `url` | yes | The release asset's `https://` URL on GitHub. |
|
||||
| `url` | yes | The release asset's `https://` URL on GitHub: `https://github.com/<owner>/<repo>/releases/download/<tag>/<file>`. When `repo` is a `https://github.com/<owner>/<repo>` URL, the asset must be in that repository. Install and Preview refuse any other `https://` URL. |
|
||||
| `sha256` | yes | The file's SHA-256, 64 hex digits. |
|
||||
| `size` | no, but reviewed | The file's size in bytes. When it is given, a download of another size is refused. |
|
||||
| `effects` | yes | The effect ids the module registers (its manifest's `id`). EffectCraft uses them to find the package that provides an effect a project needs. |
|
||||
|
||||
Reference in new issue
Block a user