Skip to content

Commit

Permalink
Remove sensitive fields from sanitize user in the admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Convly committed May 10, 2022
1 parent b11623d commit 620418c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/admin/server/services/user.js
Expand Up @@ -17,7 +17,7 @@ const sanitizeUserRoles = role => _.pick(role, ['id', 'name', 'description', 'co
*/
const sanitizeUser = user => {
return {
..._.omit(user, ['password', 'resetPasswordToken', 'roles']),
..._.omit(user, ['password', 'resetPasswordToken', 'registrationToken', 'roles']),
roles: user.roles && user.roles.map(sanitizeUserRoles),
};
};
Expand Down

0 comments on commit 620418c

Please sign in to comment.