dmk/mkcleaner

Cleans files by removing any metadata with the help of mat2, exiftool and qpdf according to BSI guidelines.

v12.0.1 2024-09-02 08:08 UTC

This package is auto-updated.

Last update: 2024-10-14 14:42:59 UTC


README

TYPO3 compatibility Latest Stable Version Total Downloads Build Status License

What does it do?

This extension cleans files by removing most of the metadata according to the BSI guidelines. This is a important step when it comes to security so no sensitive information is leaked. This is done with mat2 (https://0xacab.org/jvoisin/mat2), exiftool (https://exiftool.org/) and qpdf (https://github.com/qpdf/qpdf) in the moment. You need to install/provide those commands on the server CLI. If some command is not available system-wide the path can be configured with $GLOBALS['TYPO3_CONF_VARS']['SYS']['binSetup'] or $GLOBALS['TYPO3_CONF_VARS']['SYS']['binPath'].

Check the logs for errors after uploading files etc.

As soon as everything is setup almost every file that is added/replaced with the TYPO3 FAL API will be cleaned. Furthermore there is a scheduler job that can be used for an initial cleanup of desired folders.

Adding a custom cleaner

A custom cleaner can be added in ext_localconf.php like this:

\DMK\Mkcleaner\Cleaner\Registry::registerCleaner(\Vendor\Package\Cleaner\CustomCleaner::class, 100);

Every cleaner needs to implement DMK\Mkcleaner\Cleaner\CleanerInterface. Please take a look at the existing cleaners.

Drawbacks

Please keep in mind that neither of the tools is perfect and might break files or leave metadata present. For example pdf files sometimes loose all links or svg files have changed content when mat2 would be used. Therefore pdf files are cleaned with exiftool and qpdf instead of mat2 and svg files are omitted completely. Please take care of having svg files without metadata yourself.

Changelog

v12.0.1: Optimized description v12.0.0: Compatibility for TYPO3 11.5 and 12.4 only v8.0.2: add some error handling v8.0.1: resolve symlinks v8.0.0: initial release