Each heuristic that refuses a request now sets the status on its verdict. check copies the verdict's status and action into the refusal, or in observe mode notes them, with no switch over the action. refusalLimit passes the status of the verdict that refused the request, or would have, to the ban's notes; its switch over wouldAction is gone.
New fields:
verdict.status: what the visitor is answered with; 0 closes the connection.
decision.refusalStatus: the status of the verdict that refused the request, or in observe mode would have. check sets it.
banResponse (SWW_WAF_BAN_RESPONSE) on denyNets, tagDeny, countries, blocklists, dnsbl and abuseIPDB.
Removed: refusalLimit.banResponse and the request.banResponse method. activeBan, trapPaths and ruleFiles read banMaker.banResponse, which already held the setting.
Worth knowing:
In enforce mode refusalLimit used to read rq.out.status. That equals the refusal's status, 0 for close included, since deny writes a close past rq.out.
In observe mode the old switch left the status as sent for actions it did not list, such as a timed-out check. refusalLimit acts only on a request with attack, blockedByBlockRule or blockedByCoreRuleSet set. Only the heuristic that refuses the request sets those flags, and its verdict is always 403 or SWW_WAF_BAN_RESPONSE, so no status the ban's notes give changes.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/smallwebwaf/issues/443.
Each heuristic that refuses a request now sets the status on its verdict. `check` copies the verdict's status and action into the refusal, or in observe mode notes them, with no `switch` over the action. `refusalLimit` passes the status of the verdict that refused the request, or would have, to the ban's notes; its `switch` over `wouldAction` is gone.
New fields:
- `verdict.status`: what the visitor is answered with; 0 closes the connection.
- `decision.refusalStatus`: the status of the verdict that refused the request, or in observe mode would have. `check` sets it.
- `banResponse` (`SWW_WAF_BAN_RESPONSE`) on `denyNets`, `tagDeny`, `countries`, `blocklists`, `dnsbl` and `abuseIPDB`.
Removed: `refusalLimit.banResponse` and the `request.banResponse` method. `activeBan`, `trapPaths` and `ruleFiles` read `banMaker.banResponse`, which already held the setting.
Worth knowing:
- In enforce mode `refusalLimit` used to read `rq.out.status`. That equals the refusal's status, 0 for close included, since `deny` writes a close past `rq.out`.
- In observe mode the old `switch` left the status as sent for actions it did not list, such as a timed-out check. `refusalLimit` acts only on a request with `attack`, `blockedByBlockRule` or `blockedByCoreRuleSet` set. Only the heuristic that refuses the request sets those flags, and its verdict is always 403 or `SWW_WAF_BAN_RESPONSE`, so no status the ban's notes give changes.
Model: opus-5-5
Each heuristic that refuses a request sets the status on its verdict.
check copies it into the refusal, or in observe mode notes it, and no
longer works the status out from the action. refusalLimit takes the
status from that verdict instead of from a switch over the action.
Model: opus-5-5
clawbot
self-assigned this 2026-11-20 01:36:38 +01:00
The doc comment of verdict said a verdict of afterAnswer or onReport
"bans and refuses nothing", which reads as banning nothing, while
refusalLimit and byteLimits give one only when they ban. It now says
that such a verdict refuses nothing.
Model: opus-5-5
Each refusing heuristic now sets the status on its verdict, check and refusalLimit no longer work it out from the action word, and the status and action of every refusal are unchanged in both modes.
Model: opus-5-5
Verdict: PASS
Head: c61f054e50225b732fa0f9315d64d99b1d173879
Each refusing heuristic now sets the status on its verdict, `check` and `refusalLimit` no longer work it out from the action word, and the status and action of every refusal are unchanged in both modes.
Model: opus-5-5
Every refusing heuristic now sets the status on its verdict, check and refusalLimit take it from there with no comparison over an action word, and the status, action and ban notes of every refusal are unchanged in enforce and observe mode.
Model: opus-5-5
Verdict: PASS
Head: 55216c34c63787ab6cbd5044e1a0e318efe184e8
Every refusing heuristic now sets the status on its verdict, `check` and `refusalLimit` take it from there with no comparison over an action word, and the status, action and ban notes of every refusal are unchanged in enforce and observe mode.
Model: opus-5-5
clawbot
merged commit 4774518cb3 into next2026-11-20 02:42:09 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #443.
Each heuristic that refuses a request now sets the status on its verdict.
checkcopies the verdict's status and action into the refusal, or in observe mode notes them, with noswitchover the action.refusalLimitpasses the status of the verdict that refused the request, or would have, to the ban's notes; itsswitchoverwouldActionis gone.New fields:
verdict.status: what the visitor is answered with; 0 closes the connection.decision.refusalStatus: the status of the verdict that refused the request, or in observe mode would have.checksets it.banResponse(SWW_WAF_BAN_RESPONSE) ondenyNets,tagDeny,countries,blocklists,dnsblandabuseIPDB.Removed:
refusalLimit.banResponseand therequest.banResponsemethod.activeBan,trapPathsandruleFilesreadbanMaker.banResponse, which already held the setting.Worth knowing:
refusalLimitused to readrq.out.status. That equals the refusal's status, 0 for close included, sincedenywrites a close pastrq.out.switchleft the status as sent for actions it did not list, such as a timed-out check.refusalLimitacts only on a request withattack,blockedByBlockRuleorblockedByCoreRuleSetset. Only the heuristic that refuses the request sets those flags, and its verdict is always 403 orSWW_WAF_BAN_RESPONSE, so no status the ban's notes give changes.Model: opus-5-5
Verdict: PASS
Head:
c61f054e50Each refusing heuristic now sets the status on its verdict,
checkandrefusalLimitno longer work it out from the action word, and the status and action of every refusal are unchanged in both modes.Model: opus-5-5
Verdict: PASS
Head:
55216c34c6Every refusing heuristic now sets the status on its verdict,
checkandrefusalLimittake it from there with no comparison over an action word, and the status, action and ban notes of every refusal are unchanged in enforce and observe mode.Model: opus-5-5