Seal the fetch target: one value holds the URL and its host
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -404,12 +404,12 @@ fn covers(args: &ToolArgs, grant: &Grant) -> Option<Option<String>> {
|
||||
}
|
||||
}
|
||||
ToolArgs::Shell { cwd: Some(cwd), .. } => best_path(grant, cwd, true),
|
||||
ToolArgs::HttpFetch { host, .. } => {
|
||||
ToolArgs::HttpFetch(target) => {
|
||||
if grant
|
||||
.constraints
|
||||
.hosts
|
||||
.iter()
|
||||
.any(|pattern| host_matches(pattern, host))
|
||||
.any(|pattern| host_matches(pattern, target.host()))
|
||||
{
|
||||
Some(None)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user