refactor: Enhance type sanitization for model creation to improve security
parent
530e344e8a
commit
a162b6e7c2
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue