From c02fdccaecf1d8ecedef68c2d0ec4da044d7b3ef Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 14 Aug 2024 17:09:08 +0200 Subject: [PATCH] Fix the redirect for legacy attachment links --- wcfsetup/install/files/lib/page/AttachmentPage.class.php | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.20.1