From 8d6cdb03e8bc77eed01b7a43d3cc331e5a699f1b Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 15 Aug 2016 16:46:53 +0100 Subject: [PATCH] restrict compile check options allowed options are validate/error/silent validate = only run chktex, exit status 0 error = run compilation, exit(1) if chktex fails silent = run chktex, but always do full compilation --- .../web/app/coffee/Features/Compile/CompileController.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/CompileController.coffee b/services/web/app/coffee/Features/Compile/CompileController.coffee index 000465a83c..00f4a880ff 100755 --- a/services/web/app/coffee/Features/Compile/CompileController.coffee +++ b/services/web/app/coffee/Features/Compile/CompileController.coffee @@ -29,8 +29,8 @@ module.exports = CompileController = options.compiler = req.body.compiler if req.body?.draft options.draft = req.body.draft - if req.body?.check - options.check = if req.body.check is "validate" then "validate" else undefined + if req.body?.check in ['validate', 'error', 'silent'] + options.check = req.body.check logger.log {options:options, project_id:project_id, user_id:user_id}, "got compile request" CompileManager.compile project_id, user_id, options, (error, status, outputFiles, clsiServerId, limits, validationProblems) -> return next(error) if error?