From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: location@lists.ipfire.org Subject: [PATCH 09/10] importer: Ensure that we only use HTTPS URLs for Geofeeds Date: Tue, 27 Sep 2022 16:48:46 +0000 Message-ID: <20220927164847.3409646-9-michael.tremer@ipfire.org> In-Reply-To: <20220927164847.3409646-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3578761110909343106==" List-Id: --===============3578761110909343106== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- src/scripts/location-importer.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer= .in index 0e2764e..d0384b5 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -894,6 +894,11 @@ class CLI(object): # Update any geofeed information geofeed =3D inetnum.get("geofeed", None) =20 + # Make sure that this is a HTTPS URL + if geofeed and not geofeed.startswith("https://"): + log.warning("Geofeed URL is not using HTTPS: %s" % geofeed) + geofeed =3D None + # Store/update any geofeeds if geofeed: self.db.execute(""" --=20 2.30.2 --===============3578761110909343106==--