From fd9edea073390263fc74307af5af33d603af863c Mon Sep 17 00:00:00 2001 From: Guido Schmechel Date: Sat, 28 Sep 2024 00:06:18 +0200 Subject: [PATCH] [TASK] Add csp support for v13 --- Classes/Helper/SoundcloudHelper.php | 2 +- Configuration/ContentSecurityPolicies.php | 34 +++++++++++++++++++++++ README.md | 12 ++++++++ composer.json | 4 +-- 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 Configuration/ContentSecurityPolicies.php diff --git a/Classes/Helper/SoundcloudHelper.php b/Classes/Helper/SoundcloudHelper.php index cbb3b8b..af8a687 100644 --- a/Classes/Helper/SoundcloudHelper.php +++ b/Classes/Helper/SoundcloudHelper.php @@ -76,7 +76,7 @@ public function getPreviewImage(File $file) $previewImageUrl = trim($properties['soundcloud_thumbnail_url'] ?? ''); // get preview from soundcloud - if ($previewImageUrl !== '') { + if ($previewImageUrl === '') { $oEmbed = $this->getOEmbedData($this->getOnlineMediaId($file)); $previewImageUrl = $oEmbed['thumbnail_url']; } diff --git a/Configuration/ContentSecurityPolicies.php b/Configuration/ContentSecurityPolicies.php new file mode 100644 index 0000000..49e80ca --- /dev/null +++ b/Configuration/ContentSecurityPolicies.php @@ -0,0 +1,34 @@ +=8.2 < 8.4", - "typo3/cms-core": "^13.1" + "typo3/cms-core": "^13.3" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.49.0", + "friendsofphp/php-cs-fixer": "^3.57.0", "helmich/typo3-typoscript-lint": "^3.1.0", "phpstan/extension-installer": "^1.3.1", "phpstan/phpstan": "^1.11",