after upgrading to 9.5.17 i get in the reports the following security messages:
Server Response on static files:
www.mydomain.de/typo3temp/assets/43cd7
The error messages you are receiving are part of a security feature that has been integrated into recent TYPO3 v9.5.17 and v10.4.2 releases, see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5.x/Feature-91354-IntegrateServerResponseSecurityChecks.html
Basically it means that your current server system
test.php.txt
(.php
not at the end of the filename) still as PHP content - this can cause a security vulnerability in case somebody manages to upload a similar file (which might be considered as text/plain
file, but is actually executable PHP code)
test.html.wrong
(.html
not at the end of the filename) still as text/html
which triggers the browser to execute HTML tags and potential dangerous
tags
Call for action
In case this is a live and in production server, you should adjust your web server configuration.
The fix is to limit those web server mime-type mapping only to those files having e.g. .html
at the very end, like shown in this example for the Apache HTTP web server
AddType text/html .html .htm
Find more details and explanation in the TYPO3 security guidelines for server admins at https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/Security/GuidelinesAdministrators/Index.html#file-extension-handling
https://gist.github.com/ohader/11d737de95895f8ca16495a8b7001c45 contains examples how to adjust an .htaccess
file in case settings cannot be changed on a (shared) hosting environment.
RemoveType .html .htm
AddType text/html .html
AddType text/html .htm
RemoveType .svg .svgz
AddType image/svg+xml .svg
AddType image/svg+xml .svgz
RemoveHandler .php
# IMPORTANT: `php-fcgid` is using in THIS example
# Most probably is different for each individual configuration
SetHandler php-fcgid
# SetHandler php-script
# SetHandler application/x-httpd-php
Current handler identifier php-fcgid
was identified for the example above using a phpinfo();
and searching for $_SERVER[REDIRECT_HANDLER]
:
$_SERVER['REDIRECT_HANDLER'] php-fcgid