- Issue created by @dgroene
This may have connections with π Use a base16 hash for dynamic css/js asset names Active .
Request for /sites/default/files/js/%252e results in a 500 error - The file 'assets://js/.' does not exist - When this should result in a 404 response (since the file does not exist).
The %25 is being first translated as a "%: character, and then %2e is decoded as a dot "."
Thus the %252e is a double-encoded dot. In AssetControllerBase code
$uri = 'assets://js/' . $file_name;
if (file_exists($uri)) {
return new BinaryFileResponse($uri, 200, ['Cache-control' => static::CACHE_CONTROL]);
}
file_exists will return true, because "." is a valid directory, and then BinaryFileResponse is called with a directory rather than a file, causing the exception.
After aggregating files, make a request to /sites/default/files/js/%252e
Instead of "file_exists" use is_file so directories will not be passed to BinaryFileResponse()
Active
11.2 π₯
asset library system
This may have connections with π Use a base16 hash for dynamic css/js asset names Active .