mirror of
https://github.com/fabriziosalmi/caddy-waf.git
synced 2026-07-30 22:35:54 -04:00
ReloadRules had the identical self-deadlock fixed in ReloadConfig in v0.3.7 -- and it is the primary hot-reload branch, since the watcher routes any path containing "rule" to it. Editing rules.json wedged the server on v0.3.7 and v0.3.8. isDNSBlacklisted only lowercased and trimmed the Host header, so "evil.example:8080" and "evil.example." missed an entry for "evil.example". r.Host carries the port on any non-default port -- which every example here uses -- so those deployments had no DNS filtering, and an explicit ":443" made it a one-header bypass. Hosts are now normalised. isIPBlacklisted read m.ipBlacklist without m.mu while ReloadConfig swapped it under the lock. Now read under RLock. Suite green under -race. Two of the three were found by the automated review on #130. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>