Fix Bug with wrong ip_db_path (#338 #287) (#369)

Fixes the problem when only a file path was specified instead of a file
Reportet with Issues:
Not a valid aggregate or forensic report after fresh Install with 8.3.x #338
Not a valid aggregate or forensic report after Update to 7.1.1 #287
This commit is contained in:
Bjoern
2022-12-24 00:19:21 +01:00
committed by GitHub
parent 4217a076de
commit ea777d9d18
+5
View File
@@ -292,6 +292,11 @@ def get_ip_address_country(ip_address, db_path=None):
"dbip-country.mmdb",
]
if db_path is not None:
if os.path.isfile(db_path) is False:
db_path = None
logger.warning("IP database Option contains no file. Use internal file")
if db_path is None:
for system_path in db_paths:
if os.path.exists(system_path):