mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-17 05:26:47 +03:00
fix(core): drop the fragment from image download permission URLs
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user