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 970ddd04a2db4b681be08e3e005eb0424cf55dbe..b9a484a91801420ca780ad355e6d582e002c2350 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 @@ -755,6 +755,37 @@ class ApiController { } } } + + def getDefaultConfigXML = { + + String API_CALL = "getDefaultConfigXML" + + if (StringUtils.isEmpty(params.checksum)) { + invalid("checksumError", "You did not pass the checksum security check") + return + } + + // Do we agree on the checksum? If not, complain. + if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, API_CALL)) { + errors.checksumError() + respondWithErrors(errors) + return + } + + String defConfigXML = paramsProcessorUtil.getDefaultConfigXML(); + + response.addHeader("Cache-Control", "no-cache") + withFormat { + xml { + render(contentType:"text/xml") { + response() { + config(defConfigXML) + } + } + } + } + + } /*********************************************** * CONFIG API