From 1f20a59eb841734e7cf1dbc087915f53d01d2a97 Mon Sep 17 00:00:00 2001 From: "Sebastian BURGIN-FIX (ext)" Date: Tue, 30 Jun 2026 18:08:55 +0200 Subject: [PATCH 1/2] wip --- phpunit.xml.dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fd4c48e..727218f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -35,8 +35,6 @@ - - From 1a8f1d03f372e866eff1d4c92800e94d39ce686f Mon Sep 17 00:00:00 2001 From: "Sebastian BURGIN-FIX (ext)" Date: Tue, 30 Jun 2026 18:09:15 +0200 Subject: [PATCH 2/2] wip --- app/Security/Presets/MyCspPreset.php | 2 +- app/Support/CloudinaryUrl.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Security/Presets/MyCspPreset.php b/app/Security/Presets/MyCspPreset.php index 9f442eb..de20ef2 100644 --- a/app/Security/Presets/MyCspPreset.php +++ b/app/Security/Presets/MyCspPreset.php @@ -12,7 +12,7 @@ class MyCspPreset implements Preset { public function configure(Policy $policy): void { - $cdnHost = parse_url((string) env('AWS_CDN_ENDPOINT', ''), PHP_URL_HOST); + $cdnHost = parse_url((string) config('filesystems.disks.s3.cdn_endpoint', ''), PHP_URL_HOST); $scriptSources = array_filter([ Keyword::SELF, diff --git a/app/Support/CloudinaryUrl.php b/app/Support/CloudinaryUrl.php index 8a5ec9b..43f1f62 100644 --- a/app/Support/CloudinaryUrl.php +++ b/app/Support/CloudinaryUrl.php @@ -4,9 +4,9 @@ class CloudinaryUrl { - private const CLOUDINARY_HOST = 'res.cloudinary.com'; + private const string CLOUDINARY_HOST = 'res.cloudinary.com'; - private const UPLOAD_MARKER = '/image/upload/'; + private const string UPLOAD_MARKER = '/image/upload/'; public static function src(string $url, int $width): string { @@ -46,7 +46,7 @@ private static function stripExistingTransforms(string $path): string $segments = explode('/', $path); if ( - isset($segments[0]) + $segments[0] !== '' && preg_match('/^[a-z0-9_,.-]+$/', $segments[0]) && preg_match('/[whcfq]_/', $segments[0]) ) {