Logo
Explore Help
Register Sign In
carrot_bbs/backend
4
0
Fork 0
You've already forked backend
Code Issues 2 Pull Requests Actions Packages Projects Releases Wiki Activity
Files
master
backend/internal/config/sensitive.go

11 lines
368 B
Go
Raw Permalink Normal View History

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
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"`
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 25.6.2 Page: 64ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API