Skip to content

Commit 3c1d95d

Browse files
authored
fix(default-config): off-by-one error in the default thresholds (#701)
I don't know how I missed this in testing.
1 parent ab801a3 commit 3c1d95d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

data/botPolicies.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ status_codes:
132132
thresholds:
133133
# By default Anubis ships with the following thresholds:
134134
- name: minimal-suspicion # This client is likely fine, its soul is lighter than a feather
135-
expression: weight < 0 # a feather weighs zero units
135+
expression: weight <= 0 # a feather weighs zero units
136136
action: ALLOW # Allow the traffic through
137137
# For clients that had some weight reduced through custom rules, give them a
138138
# lightweight challenge.
139139
- name: mild-suspicion
140140
expression:
141141
all:
142-
- weight >= 0
142+
- weight > 0
143143
- weight < 10
144144
action: CHALLENGE
145145
challenge:

docs/docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ And some cleanups/refactors were added:
4040
- Bump AI-robots.txt to version 1.37
4141
- Make progress bar styling more compatible (UXP, etc)
4242
- Add `--strip-base-prefix` flag/envvar to strip the base prefix from request paths when forwarding to target servers
43+
- Fix an off-by-one in the default threshold config
4344

4445
Request weight is one of the biggest ticket features in Anubis. This enables Anubis to be much closer to a Web Application Firewall and when combined with custom thresholds allows administrators to have Anubis take advanced reactions. For more information about request weight, see [the request weight section](./admin/policies.mdx#request-weight) of the policy file documentation.
4546

0 commit comments

Comments
 (0)