From 06b7628f61e1c51988ac9d01f41217dbb741dd04 Mon Sep 17 00:00:00 2001 From: Paul Trudel Date: Tue, 7 May 2024 20:34:20 +0000 Subject: [PATCH] Restrict supported HTTP method types on endpoints --- .../org/bigbluebutton/web/UrlMappings.groovy | 40 +++++++++++++++++++ .../web/controllers/ApiController.groovy | 3 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/UrlMappings.groovy b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/UrlMappings.groovy index 2a6aab198c..ad8c713978 100755 --- a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/UrlMappings.groovy +++ b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/UrlMappings.groovy @@ -63,10 +63,26 @@ class UrlMappings { action = [GET: 'downloadFile'] } + "/bigbluebutton/api/create"(controller: "api") { + action = [GET: 'create', POST: 'create'] + } + "/bigbluebutton/api/join"(controller: "api") { action = [GET: 'join'] } + "/bigbluebutton/api/isMeetingRunning"(controller: "api") { + action = [GET: 'isMeetingRunning', POST: 'isMeetingRunning'] + } + + "/bigbluebutton/api/end"(controller: "api") { + action = [GET: 'end', POST: 'end'] + } + + "/bigbluebutton/api/getMeetingInfo"(controller: "api") { + action = [GET: 'getMeetingInfo', POST: 'getMeetingInfo'] + } + "/bigbluebutton/api/getMeetings"(controller: "api") { action = [GET: 'getMeetingsHandler', POST: 'getMeetingsHandler'] } @@ -75,6 +91,30 @@ class UrlMappings { action = [GET: 'getSessionsHandler', POST: 'getSessionsHandler'] } + "/bigbluebutton/api/enter"(controller: "api") { + action = [GET: 'enter', POST: 'enter'] + } + + "/bigbluebutton/api/stuns"(controller: "api") { + action = [GET: 'stuns', POST: 'stuns'] + } + + "/bigbluebutton/api/signOut"(controller: "api") { + action = [GET: 'signOut', POST: 'signOut'] + } + + "/bigbluebutton/api/insertDocument"(controller: "api") { + action = [GET: 'insertDocument', POST: 'insertDocument'] + } + + "/bigbluebutton/api/getJoinUrl"(controller: "api") { + action = [GET: 'getJoinUrl', POST: 'getJoinUrl'] + } + + "/bigbluebutton/api/learningDashboard"(controller: "api") { + action = [GET: 'learningDashboard', POST: 'learningDashboard'] + } + "/bigbluebutton/api/getRecordings"(controller: "recording") { action = [GET: 'getRecordingsHandler', POST: 'getRecordingsHandler'] } diff --git a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy index 3989b37470..dc9b98bc57 100755 --- a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy +++ b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy @@ -599,7 +599,8 @@ class ApiController { return } - Meeting meeting = ServiceUtils.findMeetingFromMeetingID(params.meetingID); + String meetingId = params.list("meetingID")[0] + Meeting meeting = ServiceUtils.findMeetingFromMeetingID(meetingId); withFormat { xml {