Re-add dropbox webhook signature verification and decaf cleanup (#6735)

* Re-apply #6352 dropbox webhook signature verification/ decaf cleanup

* Add verification for Sharelatex legacy dropbox app signature

* Add SL and OL dropbox app secrets to web secrets

GitOrigin-RevId: 0aa2e8371069a09330850218124937d4e03e75bb
This commit is contained in:
Thomas 2022-02-28 16:24:20 +01:00 committed by Copybot
parent 5ded04eaea
commit c47eefae5e
2 changed files with 10 additions and 0 deletions

View file

@ -81,6 +81,14 @@ function loadViewIncludes(app) {
}
}
function registerAppMiddleware(app) {
for (const module of _modules) {
if (module.appMiddleware) {
module.appMiddleware(app)
}
}
}
function moduleIncludes(view, locals) {
const compiledPartials = _viewIncludes[view] || []
let html = ''
@ -144,6 +152,7 @@ module.exports = {
loadViewIncludes,
moduleIncludes,
moduleIncludesAvailable,
registerAppMiddleware,
hooks: {
attach: attachHook,
fire: fireHook,

View file

@ -132,6 +132,7 @@ app.set('views', Path.join(__dirname, '/../../views'))
app.set('view engine', 'pug')
Modules.loadViewIncludes(app)
Modules.registerAppMiddleware(app)
app.use(bodyParser.urlencoded({ extended: true, limit: '2mb' }))
app.use(bodyParser.json({ limit: Settings.max_json_request_size }))
app.use(methodOverride())