MITRECND/WhoDat

Unexpected behavior for files with no extension

Closed this issue · 2 comments

elasticsearch_populate always adds files without extension to queue to be processed (here) when using the -d flag. CSV exceptions are handled gracefully, but we could avoid adding files that don't match the extension by changing conditional to:

if ext[1:] != self.options.extension:

One other question, is the following intended to match all files or only files without an extension:

./elasticsearch_populate.py -e '' <snip>

passing -e '' should drop the extension check, thereby allowing any files. The extension check on that line definitely is a bug, I'll update