Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix: validate imported_version type in AppDslService (#12135)

-LAN-e765d8e69e02
diff --git a/api/services/app_dsl_service.py b/api/services/app_dsl_service.py
index 528a0dbcd39..b6d6d05e589 100644
--- a/api/services/app_dsl_service.py
+++ b/api/services/app_dsl_service.py
@@ -176,6 +176,9 @@ class AppDslService:
data["kind"] = "app"
imported_version = data.get("version", "0.1.0")
+ # check if imported_version is a float-like string
+ if not isinstance(imported_version, str):
+ raise ValueError(f"Invalid version type, expected str, got {type(imported_version)}")
status = _check_version_compatibility(imported_version)
# Extract app data