Services: Intrusion Detection: Administration - our fix in the reverse log reader (7446f8cbbf) caused a regression in the alert view. closes https://github.com/opnsense/core/issues/8550

It looks like this worked by accident, since we started with the wrong offset, we accidentally hit the right record.
This commit is contained in:
Ad Schellevis 2025-04-15 10:49:32 +02:00
parent d0f745a70e
commit 6a89c8968b

View File

@ -79,7 +79,7 @@ if __name__ == '__main__':
# filter one specific log line
if 'filepos' in data_filters and data_filters['filepos'].isdigit():
log_start_pos = int(data_filters['filepos'])
log_start_pos = int(data_filters['filepos']) + 5000
else:
log_start_pos = None
@ -122,9 +122,9 @@ if __name__ == '__main__':
# do not fetch data until end of file...
break
# only try to fetch one line when filepos is given
if log_start_pos is not None:
break
# only try to fetch one line when filepos is given
if log_start_pos is not None:
break
# output results
print(ujson.dumps(result))