teaminmedias-pluswerk / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
35 stars 62 forks source link

Prevent hidden files from beeing indexed #371

Closed andreashager closed 3 years ago

andreashager commented 4 years ago

Hidden files were indexed for File List content element.

For content elements in the class property fileCTypes the method "attachedFiles()" is called that uses internal the files processor of TYPO3 (see https://github.com/teaminmedias-pluswerk/ke_search/blob/922cb0051e8e7b90d946cde7205c723267bc016a/Classes/Indexer/Types/Page.php#L937).

The TYPO3 Core FilesCollector class uses than the Method findByRelation() from the FilesRepository but the FilesRepository only uses the FrontendRestriction if your environment is on FE (see https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/core/Classes/Resource/FileRepository.php#L71). Therefore during backend processing all attached files are written to the search index (also the hidden ones).

Thanks in advance! 😄 Andi