projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security fix for project edits.
[timetracker.git]
/
mobile
/
project_edit.php
diff --git
a/mobile/project_edit.php
b/mobile/project_edit.php
index
31ea65d
..
6adb475
100644
(file)
--- a/
mobile/project_edit.php
+++ b/
mobile/project_edit.php
@@
-31,13
+31,22
@@
import('form.Form');
import('ttProjectHelper');
import('ttTeamHelper');
import('ttProjectHelper');
import('ttTeamHelper');
-// Access check.
-if (!ttAccessAllowed('manage_projects')
|| (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)
) {
+// Access check
s
.
+if (!ttAccessAllowed('manage_projects')) {
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
-
+if (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
+ header('Location: feature_disabled.php');
+ exit();
+}
$cl_project_id = (int)$request->getParameter('id');
$cl_project_id = (int)$request->getParameter('id');
+$project = ttProjectHelper::get($cl_project_id);
+if (!$project) {
+ header('Location: access_denied.php');
+ exit();
+}
+// End of access checks.
$users = ttTeamHelper::getActiveUsers();
foreach ($users as $user_item)
$users = ttTeamHelper::getActiveUsers();
foreach ($users as $user_item)
@@
-54,7
+63,6
@@
if ($request->isPost()) {
$cl_users = $request->getParameter('users', array());
$cl_tasks = $request->getParameter('tasks', array());
} else {
$cl_users = $request->getParameter('users', array());
$cl_tasks = $request->getParameter('tasks', array());
} else {
- $project = ttProjectHelper::get($cl_project_id);
$cl_name = $project['name'];
$cl_description = $project['description'];
$cl_status = $project['status'];
$cl_name = $project['name'];
$cl_description = $project['description'];
$cl_status = $project['status'];