From acb294dba7c91a8aa6d3ee8a0f440ac6b41b422c Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Mon, 11 Apr 2016 14:26:42 +0300 Subject: [PATCH 1/2] 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. --- src/RestQuery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RestQuery.js b/src/RestQuery.js index e825a5448c..767f03b637 100644 --- a/src/RestQuery.js +++ b/src/RestQuery.js @@ -477,8 +477,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; } From 7c785fd69956dd00386f99bc904827ff033f1ae0 Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Tue, 12 Apr 2016 10:06:58 +0300 Subject: [PATCH 2/2] Removing dangling variable that is never used --- src/RestQuery.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/RestQuery.js b/src/RestQuery.js index 767f03b637..68b50173f3 100644 --- a/src/RestQuery.js +++ b/src/RestQuery.js @@ -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;