add more autoban triggers:

* --ban-url: URLs which 404 and also match --sus-urls (bot-scan)
* --ban-403: trying to access volumes that dont exist or require auth
* --ban-422: invalid POST messages, fuzzing and such
* --nonsus-urls: regex of 404s which  shouldn't trigger --ban-404

in may situations it makes sense to handle this logic inside copyparty,
since stuff like cloudflare and running copyparty on another physical
box than the nginx frontend is on becomes fairly clunky
This commit is contained in:
ed 2023-08-26 13:52:24 +00:00
parent 9b46291a20
commit 50e01d6904
6 changed files with 59 additions and 15 deletions

View file

@ -189,6 +189,8 @@ class VHttpSrv(object):
self.gpwd = Garda("")
self.g404 = Garda("")
self.g403 = Garda("")
self.gurl = Garda("")
self.ptn_cc = re.compile(r"[\x00-\x1f]")