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:
Mike Salvatore 2022-07-14 07:28:53 -04:00
parent 7760520cc8
commit ea1414d0b5
1 changed files with 1 additions and 6 deletions

View File

@ -3,14 +3,10 @@ from __future__ import annotations
from bson import json_util
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):
report_dict = _encode_dot_char_before_mongo_insert(report_dict)
report_dict = encrypt_dict(sensitive_fields, report_dict)
Report.objects.delete()
Report(
overview=report_dict["overview"],
@ -22,8 +18,7 @@ def save_report(report_dict: dict):
def get_report() -> dict:
report_dict = Report.objects.first().to_mongo()
decrypted = decrypt_dict(sensitive_fields, report_dict)
return _decode_dot_char_before_mongo_insert(decrypted)
return _decode_dot_char_before_mongo_insert(report_dict)
# TODO remove this unnecessary encoding. I think these are legacy methods from back in the day