check / check (push) Waiting to run
The type was named Listed, in a package whose DNSBL verdicts carry a field Listed and whose blocklists list clients too, so the name alone did not say which list it was on. Model: opus-5-5
25 lines
765 B
Go
25 lines
765 B
Go
package waf
|
|
|
|
import (
|
|
"time"
|
|
|
|
"sneak.berlin/go/smallwebwaf/internal/reputation"
|
|
)
|
|
|
|
// BesideLookupTimeLimit is besideLookupTimeLimit.
|
|
const BesideLookupTimeLimit = besideLookupTimeLimit
|
|
|
|
// SetBesideLookupTimeLimit gives the heuristics of besideLookup limit on s in
|
|
// place of besideLookupTimeLimit.
|
|
func (s *Server) SetBesideLookupTimeLimit(limit time.Duration) {
|
|
h := s.Handler.(*handler) //nolint:forcetypeassert // New makes it one
|
|
h.besideLookupLimit = limit
|
|
}
|
|
|
|
// BanAbuseIPDBBlacklist does on s what a fetch of AbuseIPDB's blacklist with
|
|
// the clients on listed does.
|
|
func (s *Server) BanAbuseIPDBBlacklist(listed []reputation.BlacklistEntry) {
|
|
h := s.Handler.(*handler) //nolint:forcetypeassert // New makes it one
|
|
h.banAbuseIPDBBlacklist(listed)
|
|
}
|