From 2d5621af2f3678ce4959a450663f5657098144bc Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 7 Aug 2015 18:07:19 -0400 Subject: Fix permission issue when changing the url manually --- app/Controller/Base.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/Controller/Base.php b/app/Controller/Base.php index f68c4755..bfcbfd2a 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -269,12 +269,17 @@ abstract class Base extends \Core\Base */ protected function getTask() { + $project_id = $this->request->getIntegerParam('project_id'); $task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id')); if (empty($task)) { $this->notfound(); } + if ($project_id !== 0 && $project_id != $task['project_id']) { + $this->forbidden(); + } + return $task; } -- cgit v1.2.3