mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-08-21 02:23:38 +00:00
hide admin secrets from the mod log
This commit is contained in:
parent
99bf315351
commit
6da1165e29
1 changed files with 22 additions and 2 deletions
|
@ -778,9 +778,29 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const after = await this.metaService.fetch(true);
|
||||
|
||||
this.moderationLogService.log(me, 'updateServerSettings', {
|
||||
before,
|
||||
after,
|
||||
before: sanitize(before),
|
||||
after: sanitize(after),
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function sanitize(meta: Partial<MiMeta>): Partial<MiMeta> {
|
||||
return {
|
||||
...meta,
|
||||
hcaptchaSecretKey: '<redacted>',
|
||||
mcaptchaSecretKey: '<redacted>',
|
||||
recaptchaSecretKey: '<redacted>',
|
||||
turnstileSecretKey: '<redacted>',
|
||||
fcSecretKey: '<redacted>',
|
||||
smtpPass: '<redacted>',
|
||||
swPrivateKey: '<redacted>',
|
||||
objectStorageAccessKey: '<redacted>',
|
||||
objectStorageSecretKey: '<redacted>',
|
||||
deeplAuthKey: '<redacted>',
|
||||
libreTranslateKey: '<redacted>',
|
||||
verifymailAuthKey: '<redacted>',
|
||||
truemailAuthKey: '<redacted>',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue