diff --git a/auth.go b/auth.go index b20ef50..5275f41 100644 --- a/auth.go +++ b/auth.go @@ -47,19 +47,19 @@ func ParseJWT(tokenString string) (*Claims, error) { // 密码复杂度验证:至少3个大写 + 8个数字 + 1个特殊字符 func ValidatePassword(pwd string) bool { - var upper, digit, special int + if len(pwd) < 8 { + return false + } + var hasLetter, hasDigit bool for _, ch := range pwd { - if ch >= 'A' && ch <= 'Z' { - upper++ + if (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') { + hasLetter = true } if ch >= '0' && ch <= '9' { - digit++ - } - if strings.ContainsAny(string(ch), "!@#$%^&*()_+-=[]{}|;:,.<>?") { - special++ + hasDigit = true } } - return upper >= 3 && digit >= 8 && special >= 1 && len(pwd) >= 12 + return hasLetter && hasDigit } // 首次启动强制设置管理员账户 diff --git a/frpc.log b/frpc.log index 59767d1..0bc82ca 100644 --- a/frpc.log +++ b/frpc.log @@ -1,3 +1,9 @@ 2026-07-23 18:16:48.909 [I] [sub/root.go:201] start frpc service for config file [./frpc.toml] with aggregated configuration 2026-07-23 18:16:48.919 [I] [client/service.go:308] try to connect to server... 2026-07-23 18:16:49.115 [I] [client/service.go:328] [bb35e22da9644b61] login to server success, get run id [bb35e22da9644b61] +2026-07-23 18:22:55.829 [I] [sub/root.go:201] start frpc service for config file [./frpc.toml] with aggregated configuration +2026-07-23 18:22:55.837 [I] [client/service.go:308] try to connect to server... +2026-07-23 18:22:56.033 [I] [client/service.go:328] [faf7244985d4f465] login to server success, get run id [faf7244985d4f465] +2026-07-23 18:25:55.659 [I] [sub/root.go:201] start frpc service for config file [./frpc.toml] with aggregated configuration +2026-07-23 18:25:55.683 [I] [client/service.go:308] try to connect to server... +2026-07-23 18:25:55.853 [I] [client/service.go:328] [fd6724e72ed69f47] login to server success, get run id [fd6724e72ed69f47] diff --git a/static/index.html b/static/index.html index 51e4817..4162e71 100644 --- a/static/index.html +++ b/static/index.html @@ -1,6 +1,6 @@ - + - + frpc-console @@ -8,240 +8,331 @@ - + - - + +
- -
+ +
+
- -
- -