docbleach / DocBleach

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

Excel 2003: Sanitised files still have a reference to the Macros #14

Closed punkeel closed 7 years ago

punkeel commented 7 years ago

When OLE2 (files up to Office 2003) are sanitised, and Macros are removed, the "Workbook"/"Document" entry still knows about them and generates an error or a Warning.

Help asked on the Apache POI Mailing list, in hope someone has a clue on how to fix it.

This has no impact on the sanitation process, but displays ugly warnings.

Excel warning 1

Excel warning 2

punkeel commented 7 years ago

For Excel files, the ObProj Record tells Excel if macros are present or not. This record is "unknown" to Apache POI, unfortunately.

2.4.185 ObProj The existence of the ObProj record specifies that there is a VBA project in the file. This project is located in the VBA storage stream.

Source

punkeel commented 7 years ago

Bug split into three issues, as the code will be different between Excel, Word and PowerPoint.

This one can be closed, then, fixed in 15b6d44