mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
try only allowing _userId subscriptions on client routes (memory leak
attempt, see see http://goo.gl/TPYIt)
This commit is contained in:
parent
6e0caa6e7a
commit
a649863308
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ module.exports.routes = (expressApp) ->
|
|||
return res.send(500, err.response.error.message)
|
||||
else
|
||||
model = req.getModel()
|
||||
userId = model.get('_userId') or model.session.userId
|
||||
userId = model.get('_userId') #or model.session.userId # see http://goo.gl/TPYIt
|
||||
req._isServer = true
|
||||
model.fetch "users.#{userId}", (err, user) ->
|
||||
model.ref '_user', "users.#{userId}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue