mirror of
https://github.com/storytold/figcraft.git
synced 2026-12-02 15:01:23 -05:00
61947923d4
* M11: a plugin can read the web hosts its manifest names (#1883) A plugin can read fresh data (catalogues, tokens, translations) from exact hosts it names in permissions.network (plugin API 9: allowedDomains, methods GET/HEAD). The new http_request host import asks FigCraft for an https:// address on one of those hosts; FigCraft makes the request through the session's network link with no credentials, follows no redirects (the plugin gets status and location), allows 8 requests per run or callback and fails a response over 4 MB. Any other scheme, host, port, user info or method is refused before anything is sent, and a session confined to automation roots makes no requests. Importing such a plugin needs the user's approval: plugin.import takes confirm: true for it and check: true to report what a manifest asks for without installing it; the app's import shows the hosts with Import and Cancel. Manage plugins lists the hosts. A plugin directory entry can't show the hosts yet, so directories neither publish nor install such plugins. The SDK gains http_request. * Plugin web requests reach only public addresses, and an approved import must match what was shown Review fixes for #1883. A plugin's request uses no proxy and a resolver that keeps only public addresses, so a host that resolves to this computer or the local network (an approved name rebinding to one included) is refused when it connects; IP literals are refused in permissions.network. The app's Import passes the network permission it showed as confirm, and plugin.import refuses a manifest that now asks for other hosts or methods (confirm: true still works for scripts).