Skip to content

Commit e463775

Browse files
committed
Avoid showing user popup to non authenticated users if user is not a course teacher #security
1 parent 13a8fbf commit e463775

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

main/inc/ajax/user_manager.ajax.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@
6060

6161
$userData = '<h3>'.$user_info['complete_name'].'</h3>'.$user_info['mail'].$user_info['official_code'];
6262
if ($isAnonymous) {
63-
echo $userData;
63+
// Only allow anonymous users to see user popup if the popup user
64+
// is a teacher (which might be necessary to illustrate a course)
65+
if ($user_info['status'] === COURSEMANAGER) {
66+
echo $userData;
67+
} else {
68+
echo '<h3>-</h3>';
69+
}
6470
} else {
6571
echo Display::url(
6672
$userData,

0 commit comments

Comments
 (0)