Fix protocol input validation

This commit is contained in:
世界
2026-10-09 12:36:03 +08:00
parent a0d775ea66
commit 52f9bad034
22 changed files with 165 additions and 71 deletions
+3
View File
@@ -334,6 +334,9 @@ func (s *Server) authenticate(ctx gliderssh.Context, conn gossh.ConnMetadata) (*
func (s *Server) evaluatePolicy(policy *tailcfg.SSHPolicy, sshUser string, node tailcfg.NodeView, userProfile tailcfg.UserProfile, srcIP netip.Addr) (*sshConnInfo, error) {
now := time.Now()
for _, rule := range policy.Rules {
if rule == nil {
continue
}
if rule.RuleExpires != nil && now.After(*rule.RuleExpires) {
continue
}