diff options
author | geekyd | 2017-10-25 19:21:34 +0530 |
---|---|---|
committer | geekyd | 2017-10-25 19:21:34 +0530 |
commit | f7d2ef970a4b45dcc9d7bb0a4ff47d5915f4e4bc (patch) | |
tree | 0b808b294a37806e10b1277477cf5cf79afa6b02 | |
parent | 0be09e109fb2f5c76b488066834a92ce5c29c5cc (diff) |
Adds 403 response if PDF export is disabled
-rwxr-xr-x | lib/response.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js index f0f7ce9b..9e39ffb5 100755 --- a/lib/response.js +++ b/lib/response.js @@ -384,7 +384,12 @@ function noteActions (req, res, next) { actionInfo(req, res, note) break case 'pdf': - actionPDF(req, res, note) + if (config.allowpdfexport) { + actionPDF(req, res, note) + } else { + logger.error('PDF export failed: Disabled by config. Set "allowpdfexport: true" to enable. Check the documentation for details') + response.errorForbidden(res) + } break case 'gist': actionGist(req, res, note) |