Skip to content

Commit 1e527a1

Browse files
committed
Properly restrict clarification thread to team.
Previously, the following could happen: - team A requests a clarification, potentially including details the jury doesn't want to broadcast - the jury replies to everyone, removing the part from the question that they don't want to have broadcasted - team B views the reply from the jury, sees the whole clarification thread Found while working on #3087
1 parent 6573249 commit 1e527a1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

webapp/src/Controller/Team/ClarificationController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,12 @@ public function viewAction(Request $request, int $clarId): Response
101101
throw new HttpException(401, 'Permission denied');
102102
}
103103

104-
// Get the "parent" message if we have one.
104+
// Get the "parent" message if we have one - if we have access to it
105105
if ($clarification->getInReplyTo()) {
106-
$clarification = $clarification->getInReplyTo();
106+
$parent = $clarification->getInReplyTo();
107+
if ($team->canViewClarification($parent)) {
108+
$clarification = $parent;
109+
}
107110
}
108111

109112
// Mark clarification as read.

0 commit comments

Comments
 (0)