fix(core): drop the fragment from image download permission URLs

This commit is contained in:
Aiden Cline
2026-11-06 00:08:00 -06:00
Unverified
parent 3bb8eb5e4f
commit 181629b020
@@ -162,7 +162,7 @@ export const Plugin = {
// Downloads follow the same rule as the webfetch tool, so denying web access also covers image URLs.
yield* permission.assert({
action: "webfetch",
resources: [URL.parse(source)?.href ?? source],
resources: [URL.parse(source.split("#")[0])?.href ?? source],
save: ["*"],
metadata: { url: source },
...Permission.invocation(context),