docbleach / DocBleach

:shower: Sanitising your documents, one threat at a time. — Content Disarm & Reconstruction Software
MIT License
147 stars 34 forks source link

Add support for OpenOffice formats #38

Open OOTS opened 6 years ago

OOTS commented 6 years ago

Hi,

I tried to bleach an open office document (.odt) file containing a macro. DocBleach did not report any threats and declared the document to be safe.

Running docbleach with the -vv switch revealed that it recognised the file to be a zip archive (which is somewhat correct). So this issue is both a feature request (add support for Open Office formats) and a bug report: DocBleach really should not declare a open office file with macros to be safe.

Steps to reproduce:

  1. Create a .odt file with a macro.
  2. Run DocBleach on the file: java -jar docbleach.jar -in file.odt -out file-out.odt -vv

Expected behaviour: Remove the macro from the file.

Actual behaviour: The file is declared to be safe.

Best regards, OOTS

altmas5 commented 5 years ago

I am getting this error on ODT files (seems like they are not supported):

[main] TRACE xyz.docbleach.api.bleach.CompositeBleach - Using bleach: Office Bleach
[main] DEBUG xyz.docbleach.module.ooxml.OOXMLBleach - Invalid format
org.apache.poi.openxml4j.exceptions.ODFNotOfficeXmlFileException: The supplied data appears to be in ODF (Open Document) Format. Formats like these (eg ODS, ODP) are not supported, try Apache ODFToolkit