From 1b064133755b814152f9c3b988ff0b93f68af326 Mon Sep 17 00:00:00 2001 From: Iglocska Date: Thu, 7 Jul 2016 08:48:42 +0200 Subject: [PATCH] fix: Fixed an issue where an event view by a malformed UUID would result in a lookup against the leading numerical value in the malformed UUID, fixes #1338 --- app/Controller/EventsController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Controller/EventsController.php b/app/Controller/EventsController.php index d21eae5bc..a0e8dd791 100644 --- a/app/Controller/EventsController.php +++ b/app/Controller/EventsController.php @@ -859,9 +859,8 @@ class EventsController extends AppController { if ($temp == null) throw new NotFoundException('Invalid event'); $id = $temp['Event']['id']; } - $this->Event->id = $id; - if (!$this->Event->exists()) { + if (!is_numeric($id) || !$this->Event->exists()) { throw new NotFoundException(__('Invalid event.')); }