From f4a929c351de641626d092b0d6be03404b91d16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Tue, 10 Dec 2024 08:11:44 +0100 Subject: [PATCH] chg: [templates] Improved lookup of the description for cvelistv5_view macro view. --- .../web/templates/vulnerability_templates.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/website/web/templates/vulnerability_templates.html b/website/web/templates/vulnerability_templates.html index d9c0adb..668e9da 100644 --- a/website/web/templates/vulnerability_templates.html +++ b/website/web/templates/vulnerability_templates.html @@ -211,13 +211,18 @@
- {% if vulnerability_data['containers']['cna']['title'] %} + {% if vulnerability_data['containers']['cna']['descriptions'] %} + {% set languages = ['eng', 'en'] %}
-
Summary
{{vulnerability_data['containers']['cna']['title']}}
+ {% for item in vulnerability_data['containers']['cna']['descriptions'] %} + {% if item['lang'] in languages %} +
Summary
{{ item['value'] }}
+ {% endif %} + {% endfor %}
- {% else %} + {% elif vulnerability_data['containers']['cna']['title'] %}
-
Summary
{{vulnerability_data['containers']['cna']['descriptions'][0]['value']}}
+
Summary
{{vulnerability_data['containers']['cna']['title']}}
{% endif %} {% if 'meta' in vulnerability_data and 'nvd' in vulnerability_data['meta'] %} @@ -717,7 +722,7 @@
{{ vulnerability_data['gsd']['osvSchema']['details'] }}
{% else %} {% set namespaces = ['cisa.gov', 'cve.org', 'gitlab.com', 'nvd.nist.gov'] %} - {% set languages = ['eng'] %} + {% set languages = ['eng', 'en'] %} {% for namespace in namespaces %} {% if vulnerability_data['namespaces'].get(namespace, false) %} {% if 'description' in vulnerability_data['namespaces'][namespace] %}