mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
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
This commit is contained in:
@@ -29,8 +29,8 @@ module.exports = CompileController =
|
|||||||
options.compiler = req.body.compiler
|
options.compiler = req.body.compiler
|
||||||
if req.body?.draft
|
if req.body?.draft
|
||||||
options.draft = req.body.draft
|
options.draft = req.body.draft
|
||||||
if req.body?.check
|
if req.body?.check in ['validate', 'error', 'silent']
|
||||||
options.check = if req.body.check is "validate" then "validate" else undefined
|
options.check = req.body.check
|
||||||
logger.log {options:options, project_id:project_id, user_id:user_id}, "got compile request"
|
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) ->
|
CompileManager.compile project_id, user_id, options, (error, status, outputFiles, clsiServerId, limits, validationProblems) ->
|
||||||
return next(error) if error?
|
return next(error) if error?
|
||||||
|
|||||||
Reference in New Issue
Block a user