Skip to content
Snippets Groups Projects
Commit 00cacdcd authored by David Siegfried's avatar David Siegfried
Browse files

check for valid block and range, fixes #2611

Closes #2611

Merge request studip/studip!1761
parent 244d00ed
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,10 @@ abstract class ConsultationController extends AuthenticatedController ...@@ -79,6 +79,10 @@ abstract class ConsultationController extends AuthenticatedController
$block = ConsultationBlock::find($block_id); $block = ConsultationBlock::find($block_id);
if (!$block || !$block->range) {
throw new Exception(_('Dieser Terminblock ist ungültig.'));
}
if (!$block->range->isAccessibleToUser()) { if (!$block->range->isAccessibleToUser()) {
throw new AccessDeniedException(); throw new AccessDeniedException();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment