From c4a4a442264d0795efb6b04d980101933d7833cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 9 Jul 2014 20:22:58 +0200 Subject: [PATCH] Add missing validation in EditHistoryPage --- wcfsetup/install/files/lib/page/EditHistoryPage.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/page/EditHistoryPage.class.php b/wcfsetup/install/files/lib/page/EditHistoryPage.class.php index c692cbb268..2094ebcda7 100644 --- a/wcfsetup/install/files/lib/page/EditHistoryPage.class.php +++ b/wcfsetup/install/files/lib/page/EditHistoryPage.class.php @@ -116,13 +116,14 @@ class EditHistoryPage extends AbstractPage { } $this->objectType = ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID); + if (!$this->objectType) throw new IllegalLinkException(); $processor = $this->objectType->getProcessor(); $this->object = $processor->getObjectByID($this->objectID); $processor->checkPermissions($this->object); $this->activeMenuItem = $processor->getActivePageMenuItem(); $this->object->addBreadcrumbs(); - if (!$this->new) { + if (isset($_REQUEST['newID']) && !$this->new) { $this->new = $this->object; $this->newID = 'current'; } -- 2.20.1