Skip to content

Commit

Permalink
fix: parseInt caller.uid closes #10849
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Aug 19, 2022
1 parent 77e492b commit bc37a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ async function isPrivilegedOrSelfAndPasswordMatch(caller, data) {

async function processDeletion({ uid, method, password, caller }) {
const isTargetAdmin = await user.isAdministrator(uid);
const isSelf = parseInt(uid, 10) === caller.uid;
const isSelf = parseInt(uid, 10) === parseInt(caller.uid, 10);
const isAdmin = await user.isAdministrator(caller.uid);

if (isSelf && meta.config.allowAccountDelete !== 1) {
Expand Down

0 comments on commit bc37a5c

Please sign in to comment.