We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 814672b commit 78bc0daCopy full SHA for 78bc0da
main/auth/sort_my_courses.php
@@ -12,7 +12,19 @@
12
$user_course_categories = CourseManager::get_user_course_categories(api_get_user_id());
13
$courses_in_category = $auth->getCoursesInCategory(false);
14
15
-$action = isset($_REQUEST['action']) ? Security::remove_XSS($_REQUEST['action']) : '';
+// Only authorized actions
16
+$authorizedActions = [
17
+ 'edit_category',
18
+ 'edit_course_category',
19
+ 'deletecoursecategory',
20
+ 'createcoursecategory',
21
+ 'set_collapsable',
22
+ 'unsubscribe'
23
+];
24
+if (in_array(trim($_REQUEST['action']), $authorizedActions)) {
25
+ $action = trim($_REQUEST['action']);
26
+}
27
+
28
$currentUrl = api_get_self();
29
30
$interbreadcrumb[] = [
0 commit comments