From: Alexander Ebert Date: Wed, 14 Aug 2024 15:09:08 +0000 (+0200) Subject: Fix the redirect for legacy attachment links X-Git-Tag: 6.1.0_Alpha_2~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c02fdccaecf1d8ecedef68c2d0ec4da044d7b3ef;p=GitHub%2FWoltLab%2FWCF.git Fix the redirect for legacy attachment links --- diff --git a/wcfsetup/install/files/lib/page/AttachmentPage.class.php b/wcfsetup/install/files/lib/page/AttachmentPage.class.php index 44a28f1e52..8bffb9a48a 100644 --- a/wcfsetup/install/files/lib/page/AttachmentPage.class.php +++ b/wcfsetup/install/files/lib/page/AttachmentPage.class.php @@ -209,6 +209,10 @@ class AttachmentPage extends AbstractPage { parent::show(); + if ($this->attachment->getFile() !== null) { + return; + } + // etag caching if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == '"' . $this->eTag . '"') { return new EmptyResponse(304);