Bug #101165
closedUncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined array key "effective-directive" in typo3/cms-core/Classes/Middleware/AbstractContentSecurityPolicyReporter.php line 75
0%
Description
I have this issue on my 12.4.2 mentioned within "Administration log" module.
I've enabled feature "Security: frontend enforce content security policy"
I'm not able to properly reproduce the issue, not sure what circumstances are necessary to not provide the key.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined array key "effective-directive" in vendor/typo3/cms-core/Classes/Middleware/AbstractContentSecurityPolicyReporter.php line 75 | TYPO3\CMS\Core\Error\Exception thrown in file /home/daniels/webs/daniel-siepmann.de/htdocs/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php in line 138. Requested URL: https://daniel-siepmann.de/@http-reporting?csp=report&requestTime=1687638982072057
Updated by Oliver Hader over 1 year ago
- Has duplicate Bug #100912: Show CSP report source-file & user-agent added
Updated by Oliver Hader over 1 year ago
In case,
effective-directive
(preferred W3C property) is not given, butviolated-directive
(legacy W3C property) is, that value is taken - this still can happen in old browser versions.
The new class https://review.typo3.org/c/Packages/TYPO3.CMS/+/79136/5/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ReportDetails.php is dealing with this. Please see the patch I've created a month ago at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79136