From patchwork Tue Sep 27 16:48:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 6023 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4McQZ36f8wz3xGr for ; Tue, 27 Sep 2022 16:48:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4McQZ15Kg0z2Yn; Tue, 27 Sep 2022 16:48:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4McQZ1539jz2y0H; Tue, 27 Sep 2022 16:48:57 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4McQYz4Xhzz2xNS for ; Tue, 27 Sep 2022 16:48:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4McQYz3Cg2zDp; Tue, 27 Sep 2022 16:48:55 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1664297335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bI9Sx0ZqL9JuVY6v86H7pqJiL/ZXjNNUYaIHKyGbImw=; b=sdEL5NgBzoHpLVQQxVrBmDeVuImpXMG6hWIjEge56t14+YnnCIP3DAQNG4Hm+a+kf4fysZ 0XLFpJ9Z4AO6IPCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1664297335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bI9Sx0ZqL9JuVY6v86H7pqJiL/ZXjNNUYaIHKyGbImw=; b=LR32ExVXyjGoDzPjfz/iED0TlP/lyB4gXSiR4HthW1rT4T3UHmdE7RBSiFZQk7/qnuuOzd hbbphtAEdtpLvbzf7h5eCTd+TPT0xb8mYYAjk6dhKdRaIxQFeX6DpvwUz/W2TQkI37NHwF fK3N673pRQ/ZKSNpVLU5Z6GPyiVp5/QEdXVm2ii9qFhti4VAgAPF+q9G0S9FRP4szanBjn wYTq+btO6DycOS+ur3JX9Ysrcp5m2UG9nDjqVnw/CvYKOUb7HVvmICwT/p62ypb1S49yCl TJGaqUqLB7ifoo19lEBrgAptZg73AY8Go856drXs//aeMfR3nDl9VBppEm8wng== 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> References: <20220927164847.3409646-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: location-bounces@lists.ipfire.org Sender: "Location" 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 = inetnum.get("geofeed", None) + # 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 = None + # Store/update any geofeeds if geofeed: self.db.execute("""