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:
dotCooCoo committed 2026-11-05 21:02:33 -08:00
1 parent 3102b6e632
commit 55dc4a6d9e
3 files changed
+72 -15

No files matched your search

+3 -1
View File
@@ -226,7 +226,9 @@ Make a folder with an `index.json` that holds only your package:
```
File URLs are absolute: `file:///home/me/glow-rings/index.json` on Linux and macOS,
`file:///C:/Users/me/glow-rings/index.json` on Windows. Write a space as `%20`.
`file:///C:/Users/me/glow-rings/index.json` on Windows. Write a space as `%20`. Separate folders
with `/`: a file URL that holds a `\` or a percent-encoded `/` or `\`, or names a network path
(`file:////server/share/…`), is refused.
Use a separate settings folder, so the test doesn't touch your real installation: