[BUGFIX] Show source file and user agent in CSP backend module
The CSP backend module is not showing the optional source-file of the reported violation. This information references to the actual asset that caused the violation. In addition, visualizing the user-agent helps to identifiy and reproduce possible flaws. In case, `effective-directive` (preferred W3C property) is not given, but `violated-directive` (legacy W3C property) is, that value is taken - this still can happen in old browser versions. Resolves: #100912 Releases: main, 12.4 Change-Id: Idf9482d234292a15a4114c474ddb2b5316d21a87 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79562 Tested-by:core-ci <typo3@b13.com> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org>
Showing
- Build/Sources/TypeScript/backend/security/element/csp-reports.ts 31 additions, 11 deletions...ources/TypeScript/backend/security/element/csp-reports.ts
- typo3/sysext/backend/Resources/Private/Language/Modules/content-security-policy.xlf 6 additions, 0 deletions...rces/Private/Language/Modules/content-security-policy.xlf
- typo3/sysext/backend/Resources/Public/JavaScript/security/element/csp-reports.js 44 additions, 40 deletions...sources/Public/JavaScript/security/element/csp-reports.js
- typo3/sysext/core/Classes/Middleware/AbstractContentSecurityPolicyReporter.php 5 additions, 3 deletions...sses/Middleware/AbstractContentSecurityPolicyReporter.php
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Processing/HandlerTrait.php 2 additions, 2 deletions...ecurity/ContentSecurityPolicy/Processing/HandlerTrait.php
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/Report.php 3 additions, 16 deletions...asses/Security/ContentSecurityPolicy/Reporting/Report.php
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ReportDetails.php 46 additions, 0 deletions...ecurity/ContentSecurityPolicy/Reporting/ReportDetails.php
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/Reporting/ReportTest.php 87 additions, 0 deletions...t/Security/ContentSecurityPolicy/Reporting/ReportTest.php
Please register or sign in to comment