From 18a6a4514cc39001a833c67ea00ee48692c9fe72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 27 Feb 2025 23:28:14 +0100 Subject: [PATCH] fix: Exception when urlhaus results are invalid --- 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 8b785d34..ca0a8293 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -1062,7 +1062,7 @@ def modules(tree_uuid: str) -> str | WerkzeugResponse | Response: # TODO: make a short result uh = modules_responses.pop('urlhaus') for url, results in uh['urls'].items(): - if results: + if results and 'url' in results: urlhaus_short_result['urls'].append(results) urlscan_to_display: dict[str, Any] = {}