Merge pull request #2312 from overleaf/sk-fix-join-project-null

When we can't join project, produce a 403 response

GitOrigin-RevId: 7a52dd019ed33474e18cdb378fd3d4622f378e56
This commit is contained in:
Shane Kilkelly
2019-11-07 10:28:34 +00:00
committed by sharelatex
parent cbf08c599b
commit add98c889c
4 changed files with 44 additions and 10 deletions

View File

@@ -32,6 +32,9 @@ module.exports = EditorHttpController = {
if (error) {
return next(error)
}
if (!project) {
return res.sendStatus(403)
}
// Hide access tokens if this is not the project owner
TokenAccessHandler.protectTokens(project, privilegeLevel)
if (isRestrictedUser) {