mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 01:44:33 +00:00
fix(security): fail-close node camera URL downloads
This commit is contained in:
@@ -160,6 +160,15 @@ export async function resolveNodeId(
|
||||
query?: string,
|
||||
allowDefault = false,
|
||||
) {
|
||||
const nodes = await loadNodes(opts);
|
||||
return resolveNodeIdFromList(nodes, query, allowDefault);
|
||||
return (await resolveNode(opts, query, allowDefault)).nodeId;
|
||||
}
|
||||
|
||||
export async function resolveNode(
|
||||
opts: GatewayCallOptions,
|
||||
query?: string,
|
||||
allowDefault = false,
|
||||
): Promise<NodeListNode> {
|
||||
const nodes = await loadNodes(opts);
|
||||
const nodeId = resolveNodeIdFromList(nodes, query, allowDefault);
|
||||
return nodes.find((node) => node.nodeId === nodeId) ?? { nodeId };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user