mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 14:11:18 +00:00
added a null check to getRequestUserAndProject
This commit is contained in:
parent
5ffd76c670
commit
70611da833
1 changed files with 3 additions and 0 deletions
|
@ -169,6 +169,9 @@ module.exports = SecurityManager =
|
|||
|
||||
getRequestUserAndProject = (req, res, options, callback)->
|
||||
project_id = req.params.Project_id
|
||||
if !project_id?
|
||||
logger.log project_id:project_id, options:options, url:req?.url, "no project_id trying to getRequestUserAndProject"
|
||||
return res.send 422
|
||||
Project.findById project_id, 'name owner_ref readOnly_refs collaberator_refs publicAccesLevel archived', (err, project)=>
|
||||
if err?
|
||||
logger.err err:err, "error getting project for security check"
|
||||
|
|
Loading…
Reference in a new issue