Project

General

Profile

Actions

Bug #75395

closed

EXT:form – attachments from fileupload missing in mail because of isAllowedAbsPath

Added by Benjamin Robinson over 8 years ago. Updated almost 8 years ago.

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

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The attachments from fileupload fields are missing in the confirmation mail.

There's a dirty workaround (related to a Strato webspace) at https://forum.typo3.org/index.php/t/203279/ which resolves this issue.
For Typo3 7.6.4 remove line 445 ...

&& GeneralUtility::isAllowedAbsPath($file['tempFilename'])
... from /sysext/form/Classes/PostProcess/MailPostProcessor.php

I found out the the issue also occurs with webspaces of other providers, f.e. Mittwald, so I'm not sure if it's a bug or the result of an unrecommended PHP-configuration.
If the cause is a special PHP configuration, I would suggest to create an additional Install Tool "System environment check" and bring out, that this configuration will cause trouble with attachments.

My test environment:
Blank new "Webhosting XL 9.0" package from Mittwald.
Template Setup:

page = PAGE
page.10 < styles.content.get

Include static (from extension)
CSS Styled Content (css_styled_content)
Default TS (form)

Form CE Configuration
enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 
postProcessor {
    1 = mail
    1 {
        recipientEmail = me@example.com
        senderEmail = noreply@example.com
    }
}
10 = TEXTLINE
10 {
    name = textfield
    label {
        value = Textfield
    }
}
20 = FILEUPLOAD
20 {
    name = fileupload
    label {
        value = Fileupload
    }
}
30 = SUBMIT
30 {
    name = 4
    value = Send
}


Files

mittwaldTYPO3FileUploadTest.php (7.43 KB) mittwaldTYPO3FileUploadTest.php Ralf Zimmermann, 2016-06-15 17:38

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #70106: Temporary files are not deleted even though GeneralUtility::unlink_tempfile is calledClosed2015-09-25

Actions
Actions

Also available in: Atom PDF