Issue Bug Closed

#106014CSP backend module logs no frontend violations

Rudolf Rohaczek 01/29/25, 13:38 updated 01/31/25, 09:17

Description

I activated the feature security.frontend.enforceContentSecurityPolicy and purposely included various external javascript and css resources to force CSP violations. I work with TYPO3 13.4.4 and have no site specific csp.yaml. Normally this violations should be logged in the sys_http_report database table and are listed in the backend module. In my case there is nothing logged and shown.

This are the test resources which i include in my page template. I also tried it with the asset fluid viewhelpers and the html content element.

    <script>
        alert('hello world');
    </script>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>

    <style>
        .bar { color: black; }
    </style>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.2/min/tiny-slider.js"></script>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.4/tiny-slider.css">

I created this ticket because the same setup and expected behavior with TYPO3 12.4.26 is working. I downgraded my 13.4 instance to all previous security update versions of the past months but the problem still occurs. It seems that this problem exists since 13.4 LTS release. I did not check the sprint releases because it would be tricky with all my dependencies.

The included screenshots show the backend module in version 12.4.26 and 13.4.4

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 2

History 4

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-01-29T15:33:29+00:00" > 01/29/25, 15:33 </span>

    Thanks for your report. Could you:

    - show the HTTP CSP header you get in the frontend?
    - show the active csp mutations as shown in backend > configuration > csp

    That would help to pinpoint. Also, do you use the same browser with same browser exctensions/settings that worked in the other instances?
    Because csp reporting can also be suppressed in a browser. Also check the browser error console for possible reports.

  2. Rudolf Rohaczek commented <span data-processor="relativetime" data-value="2025-01-31T07:57:31+00:00" > 01/31/25, 07:57 </span>

    I found the problem in the browser console log while researching the requested infos for the answer. In the 13.4 instance there was an rewrite rule for forcing trailing slashes that did not consider @http-reporting. The older project did not have that rewrite rule, so thats why the reporting was working there. I modified the rewrite rule and now everything gets logged as expected. Thanks for your help!

  3. Garvin Hicking commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2025-01-31T09:17:51+00:00" > 01/31/25, 09:17 </span>

    Thanks for getting back quickly! I’m closing the issue due to your feedback, glad you could solve it.