From 159d444b20153187b87db085c8631e2b43ac4a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 26 Sep 2022 20:50:42 +0200 Subject: [PATCH] fix: Avoid exception on broken captures --- website/web/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index c3afeea3..91dc8d91 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -470,7 +470,7 @@ def modules(tree_uuid: str): @app.route('/tree//redirects', methods=['GET']) def redirects(tree_uuid: str): cache = lookyloo.capture_cache(tree_uuid) - if not cache: + if not cache or not hasattr(cache, 'redirects'): return Response('Not available.', mimetype='text/text') if not cache.redirects: return Response('No redirects.', mimetype='text/text')