refactor: 移除安全校验和长度限制,简化输入处理逻辑

This commit is contained in:
wizardchen
2025-12-25 19:17:48 +08:00
committed by lyingbug
parent 0e5370c7c4
commit be1ec4de5d
3 changed files with 2 additions and 23 deletions
-10
View File
@@ -68,11 +68,6 @@ func ValidateInput(input string) (string, bool) {
return "", true
}
// 检查长度
if len(input) > 10000 {
return "", false
}
// 检查是否包含控制字符
for _, r := range input {
if r < 32 && r != 9 && r != 10 && r != 13 {
@@ -197,11 +192,6 @@ func SanitizeForLog(input string) string {
sanitized = builder.String()
// 限制长度,防止日志溢出
if len(sanitized) > 1000 {
sanitized = sanitized[:1000] + "...[truncated]"
}
return sanitized
}