Merge remote-tracking branch 'origin/develop' into activitypub

This commit is contained in:
Julian Lam
2024-09-04 14:38:50 -04:00
84 changed files with 299 additions and 196 deletions

View File

@@ -319,6 +319,9 @@ module.exports = function (User) {
if (!correct) {
throw new Error('[[user:change-password-error-wrong-current]]');
}
if (data.currentPassword === data.newPassword) {
throw new Error('[[user:change-password-error-same-password]]');
}
}
const hashedPassword = await User.hashPassword(data.newPassword);