fix: #7576 "Disable password changes" can be sidestepped

This commit is contained in:
Andrew Rodrigues
2019-05-09 15:51:36 -04:00
parent e114b16d7a
commit 50260e137a
2 changed files with 9 additions and 0 deletions

View File

@@ -100,6 +100,10 @@ SocketUser.reset.send = function (socket, email, callback) {
return callback(new Error('[[error:invalid-data]]'));
}
if (meta.config['password:disableEdit']) {
return callback(new Error('[[error:no-privileges]]'));
}
user.reset.send(email, function (err) {
events.log({
type: 'password-reset',