Add additional check whether the grid view is accessible
authorMarcel Werk <burntime@woltlab.com>
Tue, 17 Dec 2024 13:32:03 +0000 (14:32 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 17 Dec 2024 13:32:03 +0000 (14:32 +0100)
wcfsetup/install/files/lib/page/AbstractGridViewPage.class.php

index b3dd37746d21973a96fa86efe847d9ab890054c9..3d89a003d7bd4d7c48df2beb1ad601d47389e517 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace wcf\page;
 
+use wcf\system\exception\PermissionDeniedException;
 use wcf\system\request\LinkHandler;
 use wcf\system\gridView\AbstractGridView;
 use wcf\system\WCF;
@@ -62,6 +63,9 @@ abstract class AbstractGridViewPage extends AbstractPage
     protected function initGridView(): void
     {
         $this->gridView = $this->createGridViewController();
+        if (!$this->gridView->isAccessible()) {
+            throw new PermissionDeniedException();
+        }
 
         if ($this->sortField) {
             $this->gridView->setSortField($this->sortField);