refactor: Enhance type sanitization for model creation to improve security

main
wizardchen 2025-11-26 22:30:12 +08:00
parent 530e344e8a
commit a162b6e7c2
1 changed files with 1 additions and 1 deletions

View File

@ -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,