Skip to content
Snippets Groups Projects

#3498472: Return 404 instead of 403 when incorrect image style URL is accessed.

Open #3498472: Return 404 instead of 403 when incorrect image style URL is accessed.
Open Manish Sharma requested to merge issue/webp-3498472:3498472-incorrect-image-url into 8.x-1.x
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -15,6 +15,7 @@ use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
/**
@@ -169,7 +170,7 @@ class ImageStyleDownloadController extends FileDownloadController {
}
}
if (!$valid) {
throw new AccessDeniedHttpException();
throw new NotFoundHttpException();
}
$derivative_uri = $image_style->buildUri($image_uri);
Loading