From 9250b95fbcf29acc7617440e91bfc0c134966a0a Mon Sep 17 00:00:00 2001 From: Francis Lessard Date: Sat, 13 Feb 2016 21:27:47 -0500 Subject: [PATCH] Fix clear session in master mode fix bug when you try to change user password whit user.save(null, { useMasterKey: true }) cause Object not found error. --- src/RestWrite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RestWrite.js b/src/RestWrite.js index 2a2b0ed2ac..34e7ae94fe 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -306,7 +306,7 @@ RestWrite.prototype.transformUser = function() { if (!this.data.password) { return; } - if (this.query) { + if (this.query && !this.auth.isMaster ) { this.storage['clearSessions'] = true; } return passwordCrypto.hash(this.data.password).then((hashedPassword) => {