[Netfilter] Skip invalid regex
parent
bf62f31b9e
commit
0884f42379
|
@ -305,7 +305,10 @@ def watch():
|
|||
refreshF2bregex()
|
||||
for rule_id, rule_regex in f2bregex.items():
|
||||
if item['data'] and item['type'] == 'message':
|
||||
try:
|
||||
result = re.search(rule_regex, item['data'])
|
||||
except re.error:
|
||||
result = False
|
||||
if result:
|
||||
addr = result.group(1)
|
||||
ip = ipaddress.ip_address(addr)
|
||||
|
|
Loading…
Reference in New Issue