Merge pull request #430 from flovilmart/clear-sessions

Fixes Parse.User.become / clears session on password change
This commit is contained in:
Fosco Marotto
2016-02-16 05:04:51 -08:00
3 changed files with 28 additions and 7 deletions

View File

@@ -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) => {