-
Notifications
You must be signed in to change notification settings - Fork 532
Closed
Description
Any user who is logged in can explore all other users certificates simply by
altering the parameter id in the url.
Given the user has id 4, the url reads:
https://myhostname/certificates/index.php?id=4
Changing the id to any other valid user id will show another users
certificate, if it exists:
https://myhostname/certificates/index.php?id=5
This is a huge privacy issue as it may reveal names and other personal user
data that is included in the other users certificates.
As a workaround I suggest to add the following check to
/certificates/index.php somewhere below the lines
$certificate = new Certificate($certificateId, $userId);
$certificateData = $certificate->get($certificateId);
if (empty($certificateData)) {
api_not_allowed(false,
Display::return_message(get_lang('NoCertificateAvailable'), 'warning'));
}
// BEGIN WORKAROUND
if ( api_get_user_id() != $certificate->user_id ) {
api_not_allowed(true);
}
// END WORKAROUND
Beeing a workaround, this will even prevent admins or course admins from
viewing students certificates.