Skip to content

Commit d939402

Browse files
committed
Agenda: Fix type paremeter #security
1 parent 33754fe commit d939402

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main/calendar/agenda_list.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
];
1313
Event::registerLog($logInfo);
1414

15-
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
15+
$typeList = ['personal', 'course', 'admin', 'platform'];
16+
$type = isset($_REQUEST['type']) && in_array($_REQUEST['type'], $typeList, true) ? $_REQUEST['type'] : null;
1617

1718
$interbreadcrumb[] = [
1819
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type='.Security::remove_XSS($type),

0 commit comments

Comments
 (0)