From: Alexander Ebert Date: Sat, 8 Jan 2022 16:41:58 +0000 (+0100) Subject: Disallowing access to a CMS page now shows an error 403 instead of 404 X-Git-Tag: 5.4.11_dev_1~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4458c5d1791db5579a268bd4424059a5bc1c8c2;p=GitHub%2FWoltLab%2FWCF.git Disallowing access to a CMS page now shows an error 403 instead of 404 --- 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);