Removing sessionToken and authData from _User objects included in a query (#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
This commit is contained in:
committed by
Florent Vilmart
parent
73a3db44ab
commit
e9e561f5e8
@@ -450,7 +450,6 @@ function includePath(config, auth, response, path) {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
let pointersHash = {};
|
let pointersHash = {};
|
||||||
var className = null;
|
|
||||||
var objectIds = {};
|
var objectIds = {};
|
||||||
for (var pointer of pointers) {
|
for (var pointer of pointers) {
|
||||||
let className = pointer.className;
|
let className = pointer.className;
|
||||||
@@ -477,8 +476,9 @@ function includePath(config, auth, response, path) {
|
|||||||
obj.__type = 'Object';
|
obj.__type = 'Object';
|
||||||
obj.className = includeResponse.className;
|
obj.className = includeResponse.className;
|
||||||
|
|
||||||
if(className == "_User"){
|
if (obj.className == "_User") {
|
||||||
delete obj.sessionToken;
|
delete obj.sessionToken;
|
||||||
|
delete obj.authData;
|
||||||
}
|
}
|
||||||
replace[obj.objectId] = obj;
|
replace[obj.objectId] = obj;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user