forked from p15670423/monkey
Island: Remove encryption from report_dal.py
Since passwords were removed from the report in 60a1e791
, there's no
need to encrypt any data in the report.
This commit is contained in:
parent
7760520cc8
commit
ea1414d0b5
|
@ -3,14 +3,10 @@ from __future__ import annotations
|
||||||
from bson import json_util
|
from bson import json_util
|
||||||
|
|
||||||
from monkey_island.cc.models.report.report import Report
|
from monkey_island.cc.models.report.report import Report
|
||||||
from monkey_island.cc.server_utils.encryption import decrypt_dict, encrypt_dict
|
|
||||||
|
|
||||||
sensitive_fields = []
|
|
||||||
|
|
||||||
|
|
||||||
def save_report(report_dict: dict):
|
def save_report(report_dict: dict):
|
||||||
report_dict = _encode_dot_char_before_mongo_insert(report_dict)
|
report_dict = _encode_dot_char_before_mongo_insert(report_dict)
|
||||||
report_dict = encrypt_dict(sensitive_fields, report_dict)
|
|
||||||
Report.objects.delete()
|
Report.objects.delete()
|
||||||
Report(
|
Report(
|
||||||
overview=report_dict["overview"],
|
overview=report_dict["overview"],
|
||||||
|
@ -22,8 +18,7 @@ def save_report(report_dict: dict):
|
||||||
|
|
||||||
def get_report() -> dict:
|
def get_report() -> dict:
|
||||||
report_dict = Report.objects.first().to_mongo()
|
report_dict = Report.objects.first().to_mongo()
|
||||||
decrypted = decrypt_dict(sensitive_fields, report_dict)
|
return _decode_dot_char_before_mongo_insert(report_dict)
|
||||||
return _decode_dot_char_before_mongo_insert(decrypted)
|
|
||||||
|
|
||||||
|
|
||||||
# TODO remove this unnecessary encoding. I think these are legacy methods from back in the day
|
# TODO remove this unnecessary encoding. I think these are legacy methods from back in the day
|
||||||
|
|
Loading…
Reference in New Issue