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)
11 lines
368 B
Go
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"`
|
|
}
|