fix(core): Remove sensitive data from User entity during serialization (no-changelog) (#8773)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-02-29 14:20:39 +01:00
committed by GitHub
parent 75e4df138f
commit d1b48ddcac
2 changed files with 25 additions and 0 deletions

View File

@@ -141,4 +141,9 @@ export class User extends WithTimestamps implements IUser {
scopeOptions,
);
}
toJSON() {
const { password, apiKey, mfaSecret, mfaRecoveryCodes, ...rest } = this;
return rest;
}
}