Generic log handling: ignore garbled data in log lines, closes https://github.com/opnsense/core/issues/4830

This commit is contained in:
Ad Schellevis 2021-03-15 19:45:31 +01:00
parent 7d0b4b539b
commit 94a8906ef9

View File

@ -38,7 +38,7 @@ def reverse_log_reader(filename, block_size=81920, start_pos=None):
:return: generator
"""
if hasattr(filename, 'read') is False:
input_stream = open(filename, 'rU')
input_stream = open(filename, 'r', errors='replace')
else:
input_stream = filename