From eafd1617d63e22c32785033f58ff8af72612e0e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 5 Aug 2021 10:42:39 +0200 Subject: [PATCH] Use PSR-7 responses in ImageProxyAction --- .../install/files/lib/action/ImageProxyAction.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/action/ImageProxyAction.class.php b/wcfsetup/install/files/lib/action/ImageProxyAction.class.php index ead31955ad..8033f6af27 100644 --- a/wcfsetup/install/files/lib/action/ImageProxyAction.class.php +++ b/wcfsetup/install/files/lib/action/ImageProxyAction.class.php @@ -6,6 +6,7 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Laminas\Diactoros\Response\RedirectResponse; use wcf\system\exception\IllegalLinkException; use wcf\system\exception\SystemException; use wcf\system\io\File; @@ -15,7 +16,6 @@ use wcf\system\WCF; use wcf\util\CryptoUtil; use wcf\util\exception\CryptoException; use wcf\util\FileUtil; -use wcf\util\HeaderUtil; use wcf\util\StringUtil; use wcf\util\Url; @@ -202,9 +202,7 @@ class ImageProxyAction extends AbstractAction $this->executed(); - HeaderUtil::redirect(WCF::getPath() . $path, true, false); - - exit; + return new RedirectResponse(WCF::getPath() . $path, 301); } catch (SystemException $e) { \wcf\functions\exception\logThrowable($e); throw new IllegalLinkException(); -- 2.20.1