Skip to content

Commit c5d5707

Browse files
committed
ignore reports of reporter's own ip
1 parent 4018411 commit c5d5707

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/riskdb/builder/load_reports.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def process(self, line: str) -> (dict, None):
3232
if r['by'] in ['127.0.0.1', '::1']:
3333
r['by'] = ''
3434

35+
# a reporter reporting his own IP
36+
if r['by'] == r['ip']:
37+
self.skip_reasons['ignored'] += 1
38+
return
39+
3540
# make sure we format them the same (remove 0000 from ipv6 and so on..)
3641
try:
3742
# pylint: disable=C0103

0 commit comments

Comments
 (0)