Skip to content

Commit 1585a9d

Browse files
author
François Jacquet
committed
Security fix: delete & save not accessible to non admins
1 parent 3b2cfa0 commit 1585a9d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

modules/Students/AddressFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DrawHeader(ProgramTitle());
33
//$_ROSARIO['allow_edit'] = true;
44

5-
if($_REQUEST['tables'] && $_POST['tables'])
5+
if($_REQUEST['tables'] && $_POST['tables'] && AllowEdit())
66
{
77
$table = $_REQUEST['table'];
88
foreach($_REQUEST['tables'] as $id=>$columns)
@@ -113,7 +113,7 @@
113113
unset($_REQUEST['tables']);
114114
}
115115

116-
if($_REQUEST['modfunc']=='delete')
116+
if($_REQUEST['modfunc']=='delete' && AllowEdit())
117117
{
118118
if($_REQUEST['id'])
119119
{

modules/Students/PeopleFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DrawHeader(ProgramTitle());
33
//$_ROSARIO['allow_edit'] = true;
44

5-
if($_REQUEST['tables'] && $_POST['tables'])
5+
if($_REQUEST['tables'] && $_POST['tables'] && AllowEdit())
66
{
77
$table = $_REQUEST['table'];
88
foreach($_REQUEST['tables'] as $id=>$columns)
@@ -113,7 +113,7 @@
113113
unset($_REQUEST['tables']);
114114
}
115115

116-
if($_REQUEST['modfunc']=='delete')
116+
if($_REQUEST['modfunc']=='delete' && AllowEdit())
117117
{
118118
if($_REQUEST['id'])
119119
{

modules/Students/StudentFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DrawHeader(ProgramTitle());
33
//$_ROSARIO['allow_edit'] = true;
44

5-
if($_REQUEST['tables'] && $_POST['tables'])
5+
if($_REQUEST['tables'] && $_POST['tables'] && AllowEdit())
66
{
77
$table = $_REQUEST['table'];
88
foreach($_REQUEST['tables'] as $id=>$columns)
@@ -118,7 +118,7 @@
118118
unset($_REQUEST['tables']);
119119
}
120120

121-
if($_REQUEST['modfunc']=='delete')
121+
if($_REQUEST['modfunc']=='delete' && AllowEdit())
122122
{
123123
if($_REQUEST['id'])
124124
{

modules/Users/UserFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DrawHeader(ProgramTitle());
33
//$_ROSARIO['allow_edit'] = true;
44

5-
if($_REQUEST['tables'] && $_POST['tables'])
5+
if($_REQUEST['tables'] && $_POST['tables'] && AllowEdit())
66
{
77
$table = $_REQUEST['table'];
88
foreach($_REQUEST['tables'] as $id=>$columns)
@@ -118,7 +118,7 @@
118118
unset($_REQUEST['tables']);
119119
}
120120

121-
if($_REQUEST['modfunc']=='delete')
121+
if($_REQUEST['modfunc']=='delete' && AllowEdit())
122122
{
123123
if($_REQUEST['id'])
124124
{

0 commit comments

Comments
 (0)