Files
backend/internal/config/sensitive.go
lafay 98b8abd26a
All checks were successful
Build Backend / build (push) Successful in 12m54s
Build Backend / build-docker (push) Successful in 1m41s
feat(config): add sensitive word filtering system with database support
Implement sensitive word filtering feature with configurable database and Redis
support. Add security enhancements including WebSocket origin validation, improved
password strength requirements, timing attack prevention, and production JWT secret
validation. Add batch operation validation limits and optimize user blocking
queries with subqueries.

BREAKING CHANGE: Password validation now requires minimum 8 characters with uppercase,
lowercase, and digit (was 6-50 characters without complexity requirements)
2026-04-07 00:07:40 +08:00

11 lines
368 B
Go

package config
type SensitiveConfig struct {
Enabled bool `mapstructure:"enabled"`
ReplaceStr string `mapstructure:"replace_str"`
MinMatchLen int `mapstructure:"min_match_len"`
LoadFromDB bool `mapstructure:"load_from_db"`
LoadFromRedis bool `mapstructure:"load_from_redis"`
RedisKeyPrefix string `mapstructure:"redis_key_prefix"`
}