waf: run the trap paths, rule files and Core Rule Set during the GeoJS wait (closes #405)
check / check (push) Failing after 1m51s
check / check (push) Failing after 1m51s
While the lookup waits for GeoJS, the trap paths, the rule files and the Core Rule Set run at the same time as the checks after the lookup. The first side to refuse answers the request; what the other side finds leaves no trace. Those three checks have 500 ms together: past it, the request is refused with 503 as checks_timed_out, with no ban and no offence. Tests hold GeoJS and the Core Rule Set with stand-ins under synctest. The test helper lifts the 500 ms limit for tests that run the real Core Rule Set, which the race detector slows past it. Model: opus-5-5
This commit was merged in pull request #408.
This commit is contained in:
1 parent
caa3079847
commit
8c9f20d346
19 files changed
+902
-84
No files matched your search
@@ -599,6 +599,11 @@ request reaches the app.
|
||||
16. A path under `/_sww/` is answered `404`, so that the app never sees that
|
||||
prefix.
|
||||
|
||||
Steps 12 to 14 only read the request. While the lookup waits for GeoJS, they run
|
||||
at the same time as steps 6 to 11. The first of the two sides to refuse the
|
||||
request ends the checks, and `waf` answers at once. Steps 12 to 14 have 500 ms
|
||||
together.
|
||||
|
||||
`rproxy` takes the rest, with `waf` counting at the end:
|
||||
|
||||
17. The request is passed to the app, streaming.
|
||||
@@ -611,9 +616,10 @@ A refused visitor is answered with `SWW_WAF_BAN_RESPONSE`. A `block` rule or a
|
||||
Core Rule Set match answers `403` and bans nobody, since the Core Rule Set has
|
||||
false positives; such refusals count toward `SWW_WAF_REFUSALS_LIMIT_PER_MINUTE`
|
||||
instead. A request over the header limits of step 3 is answered `414` for a
|
||||
request line over 8 KiB and `431` otherwise. It bans nobody either. `rproxy`
|
||||
itself answers `405` to a method it does not pass on, and the status for a size
|
||||
or time limit, such as `413` for a body too large.
|
||||
request line over 8 KiB and `431` otherwise. It bans nobody either. Nor does a
|
||||
request that steps 12 to 14 have not finished within 500 ms, which is answered
|
||||
`503`. `rproxy` itself answers `405` to a method it does not pass on, and the
|
||||
status for a size or time limit, such as `413` for a body too large.
|
||||
|
||||
### Clients and bans
|
||||
|
||||
|
||||
Reference in new issue
Block a user