Skip to content

Commit e765d8e

Browse files
authored
fix: validate imported_version type in AppDslService (#12135)
Signed-off-by: -LAN- <[email protected]>
1 parent 4bd8df1 commit e765d8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/services/app_dsl_service.py

+3
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ def import_app(
176176
data["kind"] = "app"
177177

178178
imported_version = data.get("version", "0.1.0")
179+
# check if imported_version is a float-like string
180+
if not isinstance(imported_version, str):
181+
raise ValueError(f"Invalid version type, expected str, got {type(imported_version)}")
179182
status = _check_version_compatibility(imported_version)
180183

181184
# Extract app data

0 commit comments

Comments
 (0)