Skip to content

Commit 3a3c14f

Browse files
committed
A bit more sanitizing of post parameters.
1 parent 477f47a commit 3a3c14f

13 files changed

Lines changed: 30 additions & 294 deletions

export.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('ttOrgExportHelper');

file_download.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('form.Form');

group_add.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('form.Form');

group_advanced_edit.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('form.Form');

group_delete.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('form.Form');

group_edit.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// End of access checks.
4040

4141
// Set on behalf group accordingly.
42-
$groupChanged = $request->getParameter('group_changed');
42+
$groupChanged = (bool)$request->getParameter('group_changed');
4343
if ($request->isPost() && $groupChanged) {
4444
$user->setOnBehalfGroup($group_id);
4545
}
@@ -62,11 +62,11 @@
6262
$cl_tracking_mode = $request->getParameter('tracking_mode');
6363
$cl_project_required = $request->getParameter('project_required');
6464
$cl_record_type = $request->getParameter('record_type');
65-
$cl_punch_mode = $request->getParameter('punch_mode');
66-
$cl_allow_overlap = $request->getParameter('allow_overlap');
67-
$cl_future_entries = $request->getParameter('future_entries');
68-
$cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators');
69-
$cl_confirm_save = $request->getParameter('confirm_save');
65+
$cl_punch_mode = (bool)$request->getParameter('punch_mode');
66+
$cl_allow_overlap = (bool)$request->getParameter('allow_overlap');
67+
$cl_future_entries = (bool)$request->getParameter('future_entries');
68+
$cl_uncompleted_indicators = (bool)$request->getParameter('uncompleted_indicators');
69+
$cl_confirm_save = (bool)$request->getParameter('confirm_save');
7070
} else {
7171
$cl_currency = ($group['currency'] == '' ? CURRENCY_DEFAULT : $group['currency']);
7272
$cl_lang = $group['lang'];

import.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('ttOrgImportHelper');

initialize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
ini_set('display_errors', 'Off');
1414

1515
// require_once('init_auth.php');
16-
define("APP_VERSION", "1.19.26.5425");
16+
define("APP_VERSION", "1.19.26.5426");
1717
define("APP_DIR", dirname(__FILE__));
1818
define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib");
1919
define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates");

invoice_add.php

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('form.Form');
@@ -45,7 +21,7 @@
4521

4622
if ($request->isPost()) {
4723
$cl_date = $request->getParameter('date');
48-
$cl_client = $request->getParameter('client');
24+
$cl_client = (int)$request->getParameter('client');
4925
$cl_project = $request->getParameter('project');
5026
$cl_number = trim($request->getParameter('number'));
5127
$cl_start = $request->getParameter('start');

invoice_delete.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<?php
2-
// +----------------------------------------------------------------------+
3-
// | Anuko Time Tracker
4-
// +----------------------------------------------------------------------+
5-
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
6-
// +----------------------------------------------------------------------+
7-
// | LIBERAL FREEWARE LICENSE: This source code document may be used
8-
// | by anyone for any purpose, and freely redistributed alone or in
9-
// | combination with other software, provided that the license is obeyed.
10-
// |
11-
// | There are only two ways to violate the license:
12-
// |
13-
// | 1. To redistribute this code in source form, with the copyright
14-
// | notice or license removed or altered. (Distributing in compiled
15-
// | forms without embedded copyright notices is permitted).
16-
// |
17-
// | 2. To redistribute modified versions of this code in *any* form
18-
// | that bears insufficient indications that the modifications are
19-
// | not the work of the original author(s).
20-
// |
21-
// | This license applies to this document only, not any other software
22-
// | that it may be combined with.
23-
// |
24-
// +----------------------------------------------------------------------+
25-
// | Contributors:
26-
// | https://www.anuko.com/time_tracker/credits.htm
27-
// +----------------------------------------------------------------------+
2+
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
3+
License: See license.txt */
284

295
require_once('initialize.php');
306
import('form.Form');

0 commit comments

Comments
 (0)