Treat invalid unban input as a no-op
This commit is contained in:
@@ -167,7 +167,10 @@ class BanStore:
|
|||||||
return entry
|
return entry
|
||||||
|
|
||||||
def unban_ip(self, ip: str) -> bool:
|
def unban_ip(self, ip: str) -> bool:
|
||||||
|
try:
|
||||||
normalized = self._normalize_ip(ip)
|
normalized = self._normalize_ip(ip)
|
||||||
|
except ValueError:
|
||||||
|
return False
|
||||||
with self._lock:
|
with self._lock:
|
||||||
if normalized not in self._bans:
|
if normalized not in self._bans:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user