mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-09-24 16:29:01 +08:00
refactor: Enhance type sanitization for model creation to improve security
This commit is contained in:
@@ -97,7 +97,7 @@ func (h *ModelHandler) CreateModel(c *gin.Context) {
|
||||
model := &types.Model{
|
||||
TenantID: tenantID,
|
||||
Name: secutils.SanitizeForLog(req.Name),
|
||||
Type: req.Type,
|
||||
Type: types.ModelType(secutils.SanitizeForLog(string(req.Type))),
|
||||
Source: req.Source,
|
||||
Description: secutils.SanitizeForLog(req.Description),
|
||||
Parameters: req.Parameters,
|
||||
|
||||
Reference in New Issue
Block a user