From a77d16f6d735db1fef9dd6b3db2e6579f70d6d15 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 14 Jan 2020 16:46:53 +0100 Subject: [PATCH] fix: [UI] screenshot url --- bin/lib/Correlate_object.py | 4 +--- var/www/blueprints/correlation.py | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/lib/Correlate_object.py b/bin/lib/Correlate_object.py index d08b3ddd..e39a4c73 100755 --- a/bin/lib/Correlate_object.py +++ b/bin/lib/Correlate_object.py @@ -181,9 +181,7 @@ def get_item_url(correlation_name, value, correlation_type=None): elif correlation_name == 'decoded': endpoint = 'correlation.show_correlation' url = url_for(endpoint, object_type="decoded", correlation_id=value) - elif correlation_name == 'screenshot': ### # TODO: remove me - endpoint = 'correlation.show_correlation' - elif correlation_name == 'image': + elif correlation_name == 'screenshot' or correlation_name == 'image': ### # TODO: rename me endpoint = 'correlation.show_correlation' url = url_for(endpoint, object_type="screenshot", correlation_id=value) elif correlation_name == 'domain': diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index 76c2254a..9e23bdf5 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -245,6 +245,10 @@ def graph_node_json(): correlation_names = sanitise_correlation_names(request.args.get('correlation_names')) correlation_objects = sanitise_correlation_objects(request.args.get('correlation_objects')) + # # TODO: remove me, rename screenshot to image + if object_type == 'image': + object_type == 'screenshot' + mode = sanitise_graph_mode(request.args.get('mode')) res = Correlate_object.get_graph_node_object_correlation(object_type, correlation_id, mode, correlation_names, correlation_objects, requested_correl_type=type_id, max_nodes=max_nodes)