Skip to content

Commit 0783587

Browse files
authored
Security: require course view permission to list course document templates
Refs GHSA-9r7v-p62p-h9gc
1 parent 2c9139f commit 0783587

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/CoreBundle/Controller/TemplateController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public function getAllTemplates(
134134
throw new NotFoundHttpException('Course not found');
135135
}
136136

137+
$this->denyAccessUnlessGranted(CourseVoter::VIEW, $course);
138+
137139
$languageFilterEnabled = $this->isSettingEnabled(
138140
$settingsManager->getSetting('language.template_activate_language_filter', true)
139141
);

0 commit comments

Comments
 (0)