remove sensitive data from log statement (#1522)

This commit is contained in:
Ed Robbins
2026-03-05 10:04:20 -05:00
committed by GitHub
parent 782ce8154e
commit 1560efaf03

View File

@@ -211,7 +211,9 @@ module.exports = function(srf, logger) {
if (account?.enable_debug_log) {
req.locals.logger.level = 'debug';
}
logger.debug({accountInfo: req.locals?.accountInfo?.account}, `retrieved account info for ${account_sid}`);
// eslint-disable-next-line no-unused-vars
const {bucket_credential, ...safeAccount} = req.locals?.accountInfo?.account || {};
logger.debug({accountInfo: safeAccount}, `retrieved account info for ${account_sid}`);
next();
} catch (err) {
span.end();