From 5823fad7da93fa13256833ff67b72c62d5674c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Tue, 28 Nov 2023 08:53:59 +0100 Subject: [PATCH] chg: [views] Improved the function which is generating the ATOM feed for the CVEs. --- freshermeat/web/views/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freshermeat/web/views/views.py b/freshermeat/web/views/views.py index f15b0dc..004f0d7 100644 --- a/freshermeat/web/views/views.py +++ b/freshermeat/web/views/views.py @@ -19,6 +19,7 @@ import logging import os from datetime import timezone +from urllib.parse import urljoin from feedgen.feed import FeedGenerator from flask import current_app @@ -125,7 +126,9 @@ def recent_cves(): fe.id(cve.cve_id) fe.title(f"{cve.project.name} - {cve.cve_id}") fe.description(cve.summary) - fe.link(href="https://cvepremium.circl.lu/cve/" + cve.cve_id) + fe.link( + href=urljoin(application.config["CVE_SEARCH_INSTANCE"], f"cve/{cve.cve_id}") + ) fe.updated(cve.published_at.replace(tzinfo=timezone.utc)) fe.published(cve.published_at.replace(tzinfo=timezone.utc)) atomfeed = fg.atom_str(pretty=True)