Skip to content

Commit

Permalink
Removing sessionToken and authData from _User objects included in a q…
Browse files Browse the repository at this point in the history
…uery (#1450)

* Removing sessionToken and authData from _User objects included in a query

This bug caused sessionToken to be replaced on client side to some old
sessionToken from DB.

* Removing dangling variable that is never used
  • Loading branch information
simonas-notcat authored and flovilmart committed Apr 12, 2016
1 parent 73a3db4 commit e9e561f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RestQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ function includePath(config, auth, response, path) {
return response;
}
let pointersHash = {};
var className = null;
var objectIds = {};
for (var pointer of pointers) {
let className = pointer.className;
Expand All @@ -477,8 +476,9 @@ function includePath(config, auth, response, path) {
obj.__type = 'Object';
obj.className = includeResponse.className;

if(className == "_User"){
if (obj.className == "_User") {
delete obj.sessionToken;
delete obj.authData;
}
replace[obj.objectId] = obj;
}
Expand Down

0 comments on commit e9e561f

Please sign in to comment.