diff --git a/smtp.json b/smtp.json index 70d064a..6168bb2 100644 --- a/smtp.json +++ b/smtp.json @@ -699,7 +699,6 @@ } } ], - "pip_dependencies": {}, "pip39_dependencies": { "wheel": [ { diff --git a/smtp_connector.py b/smtp_connector.py index 3f9ea67..4fc0928 100644 --- a/smtp_connector.py +++ b/smtp_connector.py @@ -693,19 +693,14 @@ def _add_attachments(self, outer, attachments, action_result, message_encoding): return action_result.set_status(phantom.APP_ERROR, SMTP_ERROR_SMTP_SEND_EMAIL) phantom_home_path = self.get_phantom_home() - report_dir_pre_4_0 = os.path.join(phantom_home_path, "www", "reports") - report_dir_post_4_0 = os.path.join(phantom_home_path, "vault", "reports") + report_dir = os.path.join(phantom_home_path, "vault", "reports") - filename = '' - for report_dir in (report_dir_post_4_0, report_dir_pre_4_0): - test_filename = os.path.join(report_dir, attachment_vault_id) - test_filename = os.path.abspath(test_filename) + test_filename = os.path.join(report_dir, attachment_vault_id) + test_filename = os.path.abspath(test_filename) - if os.path.isfile(test_filename): - filename = test_filename - break + filename = test_filename if os.path.isfile(test_filename) else "" - is_valid_path = filename.startswith(report_dir_pre_4_0) or filename.startswith(report_dir_post_4_0) + is_valid_path = filename.startswith(report_dir) if not filename or not is_valid_path: return action_result.set_status(phantom.APP_ERROR, SMTP_ERROR_SMTP_SEND_EMAIL)