"...git@developer.sourcefind.cn:danggl/opencfd-scu.git" did not exist on "eaa5a40859d6aab4752d1a80554d859724233b3c"
Unverified Commit c2e3b891 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

fix: disable ':' in tag names (#1280)

Co-authored-by: rootedbox
parent cde31cb2
...@@ -416,6 +416,11 @@ func CreateModelHandler(c *gin.Context) { ...@@ -416,6 +416,11 @@ func CreateModelHandler(c *gin.Context) {
return return
} }
if strings.Count(req.Name, ":") > 1 {
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "':' (colon) is not allowed in tag names"})
return
}
if req.Path == "" && req.Modelfile == "" { if req.Path == "" && req.Modelfile == "" {
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "path or modelfile are required"}) c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "path or modelfile are required"})
return return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment