From a4458c5d1791db5579a268bd4424059a5bc1c8c2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 8 Jan 2022 17:41:58 +0100 Subject: [PATCH] Disallowing access to a CMS page now shows an error 403 instead of 404 --- wcfsetup/install/files/lib/page/CmsPage.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/page/CmsPage.class.php b/wcfsetup/install/files/lib/page/CmsPage.class.php index 1d5bf0ee4b..ce141ee122 100644 --- a/wcfsetup/install/files/lib/page/CmsPage.class.php +++ b/wcfsetup/install/files/lib/page/CmsPage.class.php @@ -5,6 +5,7 @@ namespace wcf\page; use wcf\data\page\content\PageContent; use wcf\data\page\Page; use wcf\system\exception\IllegalLinkException; +use wcf\system\exception\PermissionDeniedException; use wcf\system\language\LanguageFactory; use wcf\system\MetaTagHandler; use wcf\system\request\LinkHandler; @@ -77,7 +78,7 @@ class CmsPage extends AbstractPage } if (!$this->page->isAccessible()) { - throw new IllegalLinkException(); + throw new PermissionDeniedException(); } $this->content = $this->page->getPageContentByLanguage($this->languageID); -- 2.20.1