Bug #88238

ext:form predefined mime types are always set

Added by Ralf Zimmermann over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2019-04-27
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

Description

The ext:form setup contains some predefined mime types for the elements "FileUpload" and "ImageUpload"

Such predefined values are used as starting values while the form element is factorized:

later on, the values from the form definition will be overlayed (https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/form/Classes/Domain/Model/FormElements/AbstractFormElement.php#L148):

A form definition like this

type: Form
identifier: test-1
label: test
prototypeName: standard
renderables:
  -
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        type: FileUpload
        identifier: fileupload-1
        label: 'File upload'
        properties:
          saveToFileMount: '1:/user_upload/'
          allowedMimeTypes:
            - application/pdf

ends up in a form element like this

        type: FileUpload
        identifier: fileupload-1
        label: 'File upload'
        properties:
          saveToFileMount: '1:/user_upload/'
          allowedMimeTypes:
            - application/msword
            - application/vnd.openxmlformats-officedocument.wordprocessingml.document
            - application/vnd.oasis.opendocument.text
            - application/pdf

We need to remove the predefined mime types from the ext:form setup-


Related issues

Related to TYPO3 Core - Bug #90188: Re-implement strict mimetype validation New 2020-01-24
Related to TYPO3 Core - Bug #92309: Missing feature flag processing/check New 2020-09-15

Associated revisions

Revision 60f5155e (diff)
Added by Ralf Zimmermann 11 months ago

[BUGFIX] Make FileUpload and ImageUpload mimetype validation more strict

Only use the "allowedMimeTypes" property values from the form definition
for the mime type validation of an uploaded file.

Resolves: #88238
Releases: master
Change-Id: Ic4cfdfc7d6b435e7936e3c312affb775093d856a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60617
Tested-by: Mathias Brodala <>
Tested-by: Björn Jacob <>
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Mathias Brodala <>
Reviewed-by: Björn Jacob <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Ralf Zimmermann over 1 year ago

  • Description updated (diff)

#2 Updated by Ralf Zimmermann over 1 year ago

  • Description updated (diff)

#3 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New 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/+/60617

#4 Updated by Susanne Moog 11 months ago

  • Sprint Focus set to Remote Sprint

#5 Updated by Gerrit Code Review 11 months ago

Patch set 2 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/+/60617

#6 Updated by Gerrit Code Review 11 months ago

Patch set 3 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/+/60617

#7 Updated by Gerrit Code Review 11 months ago

Patch set 4 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/+/60617

#8 Updated by Gerrit Code Review 11 months ago

Patch set 5 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/+/60617

#9 Updated by Anonymous 11 months ago

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

#10 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

#11 Updated by Bjoern Jacob 9 months ago

  • Related to Bug #90188: Re-implement strict mimetype validation added

#12 Updated by Mathias Brodala about 1 month ago

  • Related to Bug #92309: Missing feature flag processing/check added

Also available in: Atom PDF