diff --git a/core/admin/mailu/internal/views/auth.py b/core/admin/mailu/internal/views/auth.py index af1c552f..b1f37d17 100644 --- a/core/admin/mailu/internal/views/auth.py +++ b/core/admin/mailu/internal/views/auth.py @@ -17,9 +17,7 @@ def nginx_authentication(): response = flask.Response() for key, value in headers.items(): response.headers[key] = str(value) - if ("Auth-Status" in headers) and (headers["Auth-Status"]=="OK"): - utils.limiter.reset(flask.request.headers["Client-Ip"]) - else: + if ("Auth-Status" not in headers) or (headers["Auth-Status"]!="OK"): utils.limiter.hit(flask.request.headers["Client-Ip"]) return response diff --git a/core/admin/mailu/limiter.py b/core/admin/mailu/limiter.py index 4df78d27..fd0b138b 100644 --- a/core/admin/mailu/limiter.py +++ b/core/admin/mailu/limiter.py @@ -35,11 +35,3 @@ class Limiter: # return if not self.limiter.hit(self.rate,"client-ip",clientip): raise RateLimitExceeded() - - def reset(self,clientip): - # TODO: activate this code if we have limits at webmail level - #if ipaddress.ip_address(clientip) in self.subnet: - # # no limits for internal requests (e.g. from webmail) - # return - # limit reset is not supported by the rate limit library - pass