mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 09:20:12 +01:00
Security Fix: IDOR CWE-639 that affected WeKan 7.80-7.93.
Thanks to apitech.fr and xet7 !
This commit is contained in:
parent
0c080830bc
commit
b87cff1289
3 changed files with 87 additions and 40 deletions
|
|
@ -241,8 +241,21 @@ Template.editProfilePopup.events({
|
|||
},
|
||||
'click #deleteButton': Popup.afterConfirm('userDelete', function() {
|
||||
Popup.back();
|
||||
Users.remove(Meteor.userId());
|
||||
AccountsTemplates.logout();
|
||||
|
||||
// Use secure server method for self-deletion
|
||||
Meteor.call('removeUser', Meteor.userId(), (error, result) => {
|
||||
if (error) {
|
||||
if (process.env.DEBUG === 'true') {
|
||||
console.error('Error removing user:', error);
|
||||
}
|
||||
alert('Error deleting account: ' + error.reason);
|
||||
} else {
|
||||
if (process.env.DEBUG === 'true') {
|
||||
console.log('User deleted successfully:', result);
|
||||
}
|
||||
AccountsTemplates.logout();
|
||||
}
|
||||
});
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue