From: Jason Ish Date: Fri, 11 Oct 2019 15:24:35 +0000 (-0600) Subject: index: remove version info from bundled index X-Git-Tag: 1.1.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d674d4b5a316fe0c9ffa2c4c7599b1720fe545c;p=thirdparty%2Fsuricata-update.git index: remove version info from bundled index This prevents the issue of including outdated version info when a new release of Suricata is made with a bundled suricata-update. The user will be asked to update their sources to check their version info. --- diff --git a/suricata/update/data/update.py b/suricata/update/data/update.py index 85a7965..1d05df4 100644 --- a/suricata/update/data/update.py +++ b/suricata/update/data/update.py @@ -30,6 +30,13 @@ def embed_index(): url = "https://raw.githubusercontent.com/oisf/suricata-intel-index/master/index.yaml" response = urlopen(url) index = yaml.safe_load(response.read()) + + # Delete the version info to prevent the issue of the version info being out of + # date around a new release of Suricata where the index has not been updated + # to the latest recommended version. The user will be asked to update their + # sources to run the version check. + del(index["versions"]) + with open(dist_filename, "w") as fileobj: fileobj.write("index = %s" % (str(index)))