Project

General

Profile

Actions

Bug #94714

closed

SvgFilesSanitization prevent subsequent file search

Added by Pierrick Caillon over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2021-08-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

The method SvgFilesSanitization::resolveSvgFiles set up a file extension filter in every resource storage. However, it does not reset the filter after use.

It prevents the usage of FormPersistenceManager::listForms to retrieve the forms to check them in some own update wizard. Or any other file searching which expect the filters to be defaulted.

A trivial fix would be in svgfilessanitization.patch.

Another solution would be to update FormPersistenceManager to replace the filters instead of adding, in formpersistencemanager.patch.

Or maybe do both?

Introduced since #94492


Files

svgfilessanitization.patch (1.14 KB) svgfilessanitization.patch Pierrick Caillon, 2021-08-04 17:20
formpersistencemanager.patch (1 KB) formpersistencemanager.patch Pierrick Caillon, 2021-08-04 17:23
SomeFormWizard.php (1.79 KB) SomeFormWizard.php Bare update wizard for testing Pierrick Caillon, 2021-08-04 17:37

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #94492: Introduce t3g/svg-sanitizerClosedOliver Hader2021-07-06

Actions
Actions #1

Updated by Pierrick Caillon over 2 years ago

  • Related to Task #94492: Introduce t3g/svg-sanitizer added
Actions #2

Updated by Oliver Hader over 2 years ago

  • TYPO3 Version changed from 10 to 9
Actions #3

Updated by Oliver Hader over 2 years ago

  • Status changed from New to Needs Feedback

Thx for the report. Can you please give a short step-by-step example on how to trigger/reproduce the misbehavior? Thx!

Actions #4

Updated by Pierrick Caillon over 2 years ago

Attached in SomeFormWizard.php, a bare upgrade wizard to reproduce. The wizard must be registered as defined in documentation

You should have typo3/cms-form installed and active, and have at least one form definition in your instance.

The wizard will show up when there is a form in the instance.

The SvgFilesSanitization wizard must not have been run, or there is no SVG in your resource storages for it to be run before.

Actions #5

Updated by Pierrick Caillon over 2 years ago

  • Description updated (diff)
Actions #6

Updated by Oliver Hader over 2 years ago

  • Status changed from Needs Feedback to Accepted

Thanks for the feedback & I see...
\TYPO3\CMS\Core\Resource\StorageRepository::$storageInstances actually leads to Storage objects being handled like singletons - which shows the software design flaw, since (individual) filters should be separated from (more or less) static file-storage models.

Actions #7

Updated by Gerrit Code Review over 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70211

Actions #8

Updated by Oliver Hader over 2 years ago

@Pierrick, I've create a change request at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70211, referring to you as author since you provided the patch files.

Actions #9

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 11.3 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70295

Actions #10

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70296

Actions #11

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70297

Actions #12

Updated by Pierrick Caillon over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Pierrick Caillon over 2 years ago

@Oliver: Thanks.

Actions #14

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF