From ea1414d0b5b218c4ba2ad07cc98ef6da14d98f98 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 14 Jul 2022 07:28:53 -0400 Subject: [PATCH] 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. --- monkey/monkey_island/cc/models/report/report_dal.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monkey/monkey_island/cc/models/report/report_dal.py b/monkey/monkey_island/cc/models/report/report_dal.py index 1b24dfcc2..b70ca98b8 100644 --- a/monkey/monkey_island/cc/models/report/report_dal.py +++ b/monkey/monkey_island/cc/models/report/report_dal.py @@ -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