If a URL is a bare file, and does not end in .rules, Suricata-Update
will ignore it. Such URLs might look like:
- https://<misp>/1011
Ticket: #3664
https://redmine.openinfosecfoundation.org/issues/6777
- If no Suricata is found, Suricata-Update will assume version 6.0.0
instead of 4.0.0.
+- Handle URLs of bare files that don't end in .rules:
+ https://redmine.openinfosecfoundation.org/issues/3664
## 1.3.0 - 2023-07-07
# The file is not an archive, treat it as an individual file.
basename = os.path.basename(filename).split("-", 1)[1]
+ if not basename.endswith(".rules"):
+ basename = "{}.rules".format(basename)
files = {}
files[basename] = open(filename, "rb").read()
return files