Fix for Windows OS

This commit is contained in:
Aleksander Machniak 2025-11-22 15:28:29 +01:00
parent 7cab146f7b
commit e84c5ad54f

View File

@ -105,7 +105,9 @@ function validateStaticFile(string $path): ?string
}
// Allow images in the root folder (#10030)
if (!$found && !str_contains($path, \DIRECTORY_SEPARATOR) && str_starts_with(SUPPORTED_TYPES[strtolower($ext)], 'image/')) {
if (!$found && !str_contains($path, '/') && !str_contains($path, '\\')
&& str_starts_with(SUPPORTED_TYPES[strtolower($ext)], 'image/')
) {
$found = true;
}