[TYPO3-core] RFC #11577: [Code cleanup] t3lib_formmail floods syslog with "Possible abuse of t3lib_formmail..." messages
Martin Kutschker
masi-no at spam-typo3.org
Thu Jul 23 15:26:52 CEST 2009
Fabrizio Branca schrieb:
> This is an SVN patch request.
>
> Type: Code cleanup
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=11577
>
> Branches:
> trunk
>
> Problem:
> Whenever a form is submitted the t3lib_formmail::start() scans for 10
> attachments/uploaded files and writes a syslog entries if he doesn't
> find any. These messages are confusing and flooding the syslog
> unnecessarily.
>
> Solution:
> Remove the line writing the syslog entry
Wrong. Make a better check.
if ($_FILES[$varname] &&
!is_uploaded_file($_FILES[$varname]['tmp_name'])) {
t3lib_div::sysLog('Possible abuse of t3lib_formmail: temporary file "'
.$_FILES[$varname]['tmp_name'].'" ("'.$_FILES[$varname]['name'].
'") was not an uploaded file.', 'Core', 3);
continue;
}
BTW, the code should also check for the error status in $_FILES.
Masi
More information about the TYPO3-team-core
mailing list