Skip to content

Commit

Permalink
attendance --> fix sql injection
Browse files Browse the repository at this point in the history
  • Loading branch information
jexi committed Dec 18, 2017
1 parent 783b365 commit fce0882
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/attendance/index.php
Expand Up @@ -44,11 +44,11 @@
WHERE user.id = course_user.user_id
AND course_user.course_id = ?d
AND course_user.status = " . USER_STUDENT . "
AND user.id NOT IN (SELECT uid FROM attendance_users WHERE attendance_id = $_REQUEST[attendance_id]) ORDER BY surname", $course_id);
AND user.id NOT IN (SELECT uid FROM attendance_users WHERE attendance_id = ?d) ORDER BY surname", $course_id, $_REQUEST['attendance_id']);
$data[0] = $d1;
// users who already participate in attendance
$d2 = Database::get()->queryArray("SELECT uid AS id, givenname, surname FROM user, attendance_users
WHERE attendance_users.uid = user.id AND attendance_id = $_REQUEST[attendance_id] ORDER BY surname");
WHERE attendance_users.uid = user.id AND attendance_id = ?d ORDER BY surname", $_REQUEST['attendance_id']);
$data[1] = $d2;
}
}
Expand Down

0 comments on commit fce0882

Please sign in to comment.