]> git.ipfire.org Git - thirdparty/suricata-update.git/commit
Load files into list, not dict to keep duplicate filenames
authorJason Ish <jason.ish@oisf.net>
Wed, 8 Jul 2020 22:52:12 +0000 (16:52 -0600)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 3 Sep 2020 15:51:33 +0000 (21:21 +0530)
commitdeccfe5d31e1a4e4f965afccd1f7e5bf827f346b
treecdfcf1d2d04040d8c7c3c26379b34199b4cd78f2
parent093f7a338b2fd6bce47ee01fb12652842957f3a0
Load files into list, not dict to keep duplicate filenames

By loading all downloaded rule files into the same dict, filenames
that are the same cause other files to be lost, and the content
may be different.

Instead use of list objects that tracks the filename and the content
to avoid losing the contents of a filename that already exists.

If the contents is duplicated, the rule deduplication process
will catch that.

Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3174
suricata/update/main.py