]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
index: remove version info from bundled index
authorJason Ish <jason.ish@oisf.net>
Fri, 11 Oct 2019 15:24:35 +0000 (09:24 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 11 Oct 2019 15:26:43 +0000 (09:26 -0600)
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.

suricata/update/data/update.py

index 85a796530853461813e3c125a82f2b4666ec3467..1d05df4f3f7a96dfe01482db075b533a80abe854 100644 (file)
@@ -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)))