You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADE.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
1
# Upgrade Notes
2
2
3
+
## 5.3.4
4
+
-**[SECURITY]** Introduce upload field reference and server-side MIME type validation. Read more about upload security [here](./docs/80_FileUpload.md#security)
5
+
3
6
## 5.3.3
4
7
-**[BUGFIX]** Sanitize form field values by removing template tags during output transformation
"form_builder_type_field.placeholder_desc","This option determines whether or not a special 'empty' option (e.g. 'Choose an option') will appear at the top of a select field. This option only applies if the multiple option is set to false. Leave empty for no default option.","Diese Option legt fest, ob eine spezielle 'leere' Option (z. B. 'Wählen Sie eine Option') am oberen Rand eines Auswahlfeldes erscheinen soll. Diese Option gilt nur, wenn die Option 'Mehrfach' nicht aktiv ist. Leer lassen für keine Standardoption."
"form_builder_type_field.allowed_extensions_desc","Add some extensions and confirm with enter.","Fügen Sie erlaubte Dateierweiterungen hinzu und bestätigen Sie mit der Enter-Taste."
98
+
"form_builder_type_field.allowed_extensions_desc","Add some extensions and confirm with Enter. If server-side MIME type validation is enabled, you can also specify full MIME types (e.g. application/pdf).","Fügen Sie erlaubte Dateierweiterungen hinzu und bestätigen Sie mit der Enter-Taste. Wenn die serverseitige MIME-Type-Validierung aktiviert ist, können Sie auch vollständige MIME-Typen angeben (z. B. application/pdf)."
"form_builder_type_field.item_limit_desc","The maximum number of files that can be uploaded. 0 = unlimited.","Die maximale Anzahl an Dateien welche hochgeladen werden darf. 0 = Kein Limit."
Copy file name to clipboardExpand all lines: docs/80_FileUpload.md
+51-9Lines changed: 51 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,29 @@
1
1
# Dynamic Multi File
2
2
3
-
FormBuilder comes with a smart multifile upload type.
3
+
FormBuilder comes with a smart multi-file upload type.
4
4
It allows you to use different adapters/libraries like FineUploader or DropZoneJs.
5
5
6
6
## Highlights
7
7
- File Upload per file type (yes, it's possible to place multiple upload fields per form)
8
8
- Large File Support: Process chunked files to allow large file uploads
9
9
- Different adapters: Choose between different upload handler or create a custom one!
10
10
- Stateless: no session is required to handle file uploads
11
-
- Different storage principals: Store data as pimcore assets (`/formdata` asset folder) and add download-link to mail **or** add them as native mail attachments
11
+
- Different storage principals: Store data as pimcore assets (`/formdata` asset folder) and add a download-link to mail **or** add them as native mail attachments
12
12
- Stay clean: unsubmitted data / chunk data will be swiped via maintenance
13
-
- Prebuild Extensions: Use included jQuery extensions to set up your form in front end in no time!
13
+
- Prebuild Extensions: Use included jQuery extensions to set up your form in the front end in no time!
14
14
15
15
## Field Configuration
16
16
There are some options in the (backend) field configuration:
17
17
18
-
| Name | Description
19
-
|------|------------|
20
-
|`Max File Size`| Max file size will be calculated in MB. Empty or zero means no limit |
21
-
|`Allowed Extensions`| Define allowed extensions, for example: `pdf, zip` (Format depends on active adapter) |
22
-
|`Item limit`| The maximum number of files that can be uploaded. Empty or zero means no limit |
|`Max File Size`| Max file size will be calculated in MB. Empty or zero means no limit|
21
+
|`Allowed Extensions`| Define allowed extensions, for example: `pdf, zip` (Format depends on active adapter)|
22
+
|`Item limit`| The maximum number of files that can be uploaded. Empty or zero means no limit|
23
23
|`Send Files as Attachment`| All Files will be stored in your pimcore asset structure (/formdata) by default. If you check this option, the files will be attached to the mail instead of adding a download link |
24
24
25
25
## Setup
26
-
Per default, FineUploader will be used. If you want to change the dmf adapter, you need to define it:
26
+
Per default, DropZone will be used. If you want to change the dmf adapter, you need to define it:
27
27
28
28
```yaml
29
29
form_builder:
@@ -34,6 +34,48 @@ form_builder:
34
34
By default, you don't need to implement more than the standard initialization, described in [FormBuilder Javascript Core Extension](./91_Javascript.md).
35
35
The core extension will try to fetch the handler path, defined by `dynamicMultiFileHandlerOptions.defaultHandlerPath`.
36
36
37
+
## Security
38
+
39
+
### Field Reference
40
+
41
+
```yaml
42
+
form_builder:
43
+
security:
44
+
enable_upload_field_reference: true
45
+
```
46
+
47
+
The Field Reference feature ensures that every uploaded file is associated with an existing form field.
48
+
When enabled, the client must send a reference to the corresponding form field along with the file.
49
+
The server validates that the field exists and that the upload complies with the field’s configuration (e.g., allowed file types, maximum upload size).
50
+
51
+
> [!CAUTION]
52
+
> This option is disabled by default to avoid breaking existing uploads.
53
+
> Enable it when you want to enforce field-level validation.
54
+
55
+
### Server MIME Type Validation
56
+
57
+
```yaml
58
+
form_builder:
59
+
security:
60
+
enable_upload_server_mime_type_validation: true
61
+
```
62
+
63
+
Server MIME Type Validation enforces that uploaded files match the allowed MIME types defined on the server.
64
+
When enabled, the server checks the actual file content rather than relying solely on file extensions provided by the client.
65
+
This ensures that only valid file types are accepted, preventing spoofed files or uploads that do not match the allowed formats.
66
+
67
+
> [!CAUTION]
68
+
>Important: When MIME type validation is active, you must list the allowed MIME types in your form field configuration.
69
+
> Users can no longer just specify file extensions (like `pdf` or `jpg`); the server will validate the real MIME type of the uploaded file (for example, `application/pdf` or `image/jpeg`).
70
+
> If the MIME type of the file is not included in the server configuration, the upload will be rejected, even if the file extension appears valid.
71
+
> Always ensure the MIME types in your configuration match the types you expect to allow for uploads.
72
+
73
+
> [!CAUTION]
74
+
> Note: This option is disabled by default to maintain backward compatibility.
75
+
> Enable it when you want the server to strictly validate MIME types for uploaded files.
0 commit comments