hotfix(wsauth+restart_template): CanvasOrBearer return + CWE-22 path traversal guard
- wsauth_middleware: add missing return after AbortWithStatusJSON in CanvasOrBearer final else branch (CRITICAL auth bypass) - restart_template: apply sanitizeRuntime before filepath.Join to prevent CWE-22 path traversal via dbRuntime field
This commit is contained in:
parent
a59f1a6ce4
commit
f11b1703f0
@ -304,6 +304,7 @@ func CanvasOrBearer(database *sql.DB) gin.HandlerFunc {
|
||||
}
|
||||
|
||||
c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{"error": "admin auth required"})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user