gpt4 book ai didi

typo3 - 升级到 9.5.17 后的安全消息

转载 作者:行者123 更新时间:2023-12-04 11:20:32 24 4
gpt4 key购买 nike

升级到 9.5.17 后,我在报告中收到以下安全消息:

服务器对静态文件的响应:

www.mydomain.de/typo3temp/assets/43cd7f07.tmp/2500f854.html.wrong
unexpected content-type text/html
www.mydomain.de/typo3temp/assets/43cd7f07.tmp/2500f854.1.svg.wrong
unexpected content-type image/svg+xml
www.mydomain.de/typo3temp/assets/43cd7f07.tmp/2500f854.php.wrong
unexpected content PHP content
www.mydomain.de/typo3temp/assets/43cd7f07.tmp/2500f854.php.txt
unexpected content PHP content

这是什么意思?

我检查了文件夹/typo3temp/assets/- 没有文件夹 43cd7f07.tmp

谢谢!

最佳答案

您收到的错误消息是安全功能的一部分,该功能已集成到最近的 TYPO3 v9.5.17 和 v10.4.2 版本中,请参阅 https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5.x/Feature-91354-IntegrateServerResponseSecurityChecks.html

基本上这意味着您当前的服务器系统

  • 正在评估类似 test.php.txt 的文件( .php 不在文件名的末尾)仍然作为 PHP 内容 - 这可能会导致安全漏洞,以防有人设法上传类似的文件(可能被视为 text/plain 文件,但实际上是可执行的 PHP 代码)
  • 潜在 远程代码执行
  • 正在提供类似 test.html.wrong 的文件( .html 不在文件名末尾)仍为 text/html触发浏览器执行 HTML 标签和潜在危险 <script>标签
  • 潜在 跨站脚本

  • Call for action

    In case this is a live and in production server, you should adjust your web server configuration.



    解决方法是将那些 Web 服务器 MIME 类型映射限制为仅包含具有例如 .html最后,如本示例中所示的 Apache HTTP Web 服务器
    <FilesMatch ".+\.html?$">
    AddType text/html .html .htm
    </FilesMatch>

    https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/Security/GuidelinesAdministrators/Index.html#file-extension-handling 服务器管理员的 TYPO3 安全指南中查找更多详细信息和解释。

    2020 年 5 月 17 日更新

    https://gist.github.com/ohader/11d737de95895f8ca16495a8b7001c45包含如何调整 .htaccess 的示例文件,以防在(共享)托管环境中无法更改设置。
    <IfModule mod_mime.c>
    RemoveType .html .htm
    <FilesMatch ".+\.html?$">
    AddType text/html .html
    AddType text/html .htm
    </FilesMatch>

    RemoveType .svg .svgz
    <FilesMatch ".+\.svgz?$">
    AddType image/svg+xml .svg
    AddType image/svg+xml .svgz
    </FilesMatch>

    RemoveHandler .php
    <FilesMatch ".+\.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
    </FilesMatch>
    </IfModule>

    当前处理程序标识符 php-fcgid使用 phpinfo(); 为上述示例标识并搜索 $_SERVER[REDIRECT_HANDLER] :
    $_SERVER['REDIRECT_HANDLER'] php-fcgid

    关于typo3 - 升级到 9.5.17 后的安全消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61759835/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com