HXLStandard / libhxl-python

Python support library for the Humanitarian Exchange Language (HXL) data standard.
The Unlicense
40 stars 10 forks source link

Use stricter checking for CSV #323

Closed davidmegginson closed 1 year ago

davidmegginson commented 1 year ago
davidmegginson commented 1 year ago

Note that XLSX_MIME_TYPES and XLS_MIME_TYPES are never used.

davidmegginson commented 1 year ago

Note that we can't trust the XLSX and XLS mime types, because servers sometimes server out CSV with them (and even with .xls or .xlsx file extensions).

davidmegginson commented 1 year ago

We no longer fall back to CSV if there's a MIME type or file extension and it's not in the allow list. This prevents trying to process (e.g.) a png file.