Commit 1e119187 authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Security check for 404 and styles folder

parent a452cb52
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for src/DownloadManager.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ final class DownloadManager implements DownloadManagerInterface {
      $response = $this->client->get($url, $options);
    }
    catch (ClientException $e) {
      if ($e->getCode() == 404) {
      if ($e->getCode() == 404 && str_starts_with($relative_path, 'styles/')) {
        // If this is a 404, it may be an image style that is converting the
        // file type.
        // @see \Drupal\image\Controller\ImageStyleDownloadController::deliver()