MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / prepareRecordUnsafe

Method prepareRecordUnsafe

core/init/auth/ip_tracker.go:150–160  ·  view source on GitHub ↗
(ip string, record *IPRecord)

Source from the content-addressed store, hash-verified

148}
149
150func (t *IPTracker) prepareRecordUnsafe(ip string, record *IPRecord) bool {
151 if time.Since(record.LastUpdate) > ExpireDuration {
152 return false
153 }
154 if !record.LockedUntil.IsZero() && !time.Now().Before(record.LockedUntil) {
155 record.FailedCount = 0
156 record.LockedUntil = time.Time{}
157 record.LastUpdate = time.Now()
158 }
159 return true
160}

Callers 4

NeedCaptchaMethod · 0.95
IsLockedMethod · 0.95
SetNeedCaptchaMethod · 0.95
RecordFailureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected