Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: add UUID validation for tool file ID extraction (#12011)
-LAN-d0dd8b795541
diff --git a/api/core/workflow/nodes/tool/tool_node.py b/api/core/workflow/nodes/tool/tool_node.pyindex 3b56f948763..983fa7e6231 100644--- a/api/core/workflow/nodes/tool/tool_node.py+++ b/api/core/workflow/nodes/tool/tool_node.py@@ -1,5 +1,6 @@from collections.abc import Mapping, Sequencefrom typing import Any+from uuid import UUIDfrom sqlalchemy import selectfrom sqlalchemy.orm import Session@@ -231,6 +232,10 @@ class ToolNode(BaseNode[ToolNodeData]):url = str(response.message)transfer_method = FileTransferMethod.TOOL_FILEtool_file_id = url.split("/")[-1].split(".")[0]+ try:+ UUID(tool_file_id)+ except ValueError:+ raise ToolFileError(f"cannot extract tool file id from url {url}")with Session(db.engine) as session:stmt = select(ToolFile).where(ToolFile.id == tool_file_id)tool_file = session.scalar(stmt)