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

pull/1341/head
Iglocska 2016-07-07 08:48:42 +02:00
parent 8b97dfd26f
commit 1b06413375
1 changed files with 1 additions and 2 deletions

View File

@ -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.'));
}