Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/lib/server/methods/deleteUserOwnAccount.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { Accounts } from 'meteor/accounts-base';
import { SHA256 } from 'meteor/sha';
import s from 'underscore.string';

import { settings } from '../../../settings';
Expand Down Expand Up @@ -34,7 +35,7 @@ Meteor.methods({
if (result.error) {
throw new Meteor.Error('error-invalid-password', 'Invalid password', { method: 'deleteUserOwnAccount' });
}
} else if (user.username !== s.trim(password)) {
} else if (SHA256(user.username) !== s.trim(password)) {
throw new Meteor.Error('error-invalid-username', 'Invalid username', { method: 'deleteUserOwnAccount' });
}

Expand Down
1 change: 0 additions & 1 deletion client/views/account/AccountProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ const AccountProfilePage = () => {
onCancel={closeModal}
title={title}
text={t('If_you_are_sure_type_in_your_username')}
isPassword
/>
));
}, [closeModal, deleteOwnAccount, dispatchToastMessage, erasureType, localPassword, t, setModal]);
Expand Down