From 6608286e8c5decc41425e5a99a240f501d0ecf30 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:08:52 +0700 Subject: [PATCH] fixed: don't log carrier register_credential to log (#244) * fixed: don't log carrier register_credential to log * upgrade realtimedb helper 0.8.21 --- eslint.config.js | 2 +- lib/middleware.js | 3 ++- package-lock.json | 9 +++++---- package.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 80d1dee..f8b154a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -96,7 +96,7 @@ module.exports = [ // Variables 'no-delete-var': 2, 'no-undef': 2, - 'no-unused-vars': [2, {args: 'none'}], + 'no-unused-vars': [2, {args: 'none', ignoreRestSiblings: true}], // Node.js and CommonJS 'no-mixed-requires': 2, diff --git a/lib/middleware.js b/lib/middleware.js index 123ba9c..b6f84f8 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -130,7 +130,8 @@ module.exports = function(srf, logger) { logger.info('identifyAccount: rejecting call from carrier because DID has not been provisioned'); return res.send(404, 'Number Not Provisioned'); } - logger.info({gateway}, 'identifyAccount: incoming call from gateway'); + const {register_password, ...gatewayForLog} = gateway; + logger.info({gateway: gatewayForLog}, 'identifyAccount: incoming call from gateway'); const appSidHeader = req.get('x-application-sid'); if (appSidHeader && appSidHeader == application_sid) { logger.info({callId}, 'Loop Detected, x-application-sid header on incoming call matches applicationSid'); diff --git a/package-lock.json b/package-lock.json index 99208f9..019c4a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@jambonz/db-helpers": "^0.9.18", "@jambonz/digest-utils": "^0.0.9", "@jambonz/http-health-check": "^0.0.1", - "@jambonz/realtimedb-helpers": "^0.8.18", + "@jambonz/realtimedb-helpers": "^0.8.21", "@jambonz/rtpengine-utils": "^0.4.4", "@jambonz/siprec-client-utils": "^0.2.10", "@jambonz/stats-collector": "^0.1.10", @@ -1538,9 +1538,10 @@ } }, "node_modules/@jambonz/realtimedb-helpers": { - "version": "0.8.18", - "resolved": "https://registry.npmjs.org/@jambonz/realtimedb-helpers/-/realtimedb-helpers-0.8.18.tgz", - "integrity": "sha512-PfQRsOy/uKSA0ymRAEmTQnLxc1BZVRQWc+5mClLX6oB6vgvM/6YGgiuv5GSu26OtuKMTtS+RAxlFeT05iH/2rg==", + "version": "0.8.21", + "resolved": "https://registry.npmjs.org/@jambonz/realtimedb-helpers/-/realtimedb-helpers-0.8.21.tgz", + "integrity": "sha512-Zn/Zw14U0L1pB2RlN5i160FwWqphonhQ7p880OzsKOuvg+wmj6qIkxdLjDXo6TSxFPXDHD25s33zfGOT6ZIfsw==", + "license": "MIT", "dependencies": { "debug": "^4.3.4", "ioredis": "^5.3.2" diff --git a/package.json b/package.json index cce12ee..74f65d8 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@jambonz/db-helpers": "^0.9.18", "@jambonz/digest-utils": "^0.0.9", "@jambonz/http-health-check": "^0.0.1", - "@jambonz/realtimedb-helpers": "^0.8.18", + "@jambonz/realtimedb-helpers": "^0.8.21", "@jambonz/rtpengine-utils": "^0.4.4", "@jambonz/siprec-client-utils": "^0.2.10", "@jambonz/stats-collector": "^0.1.10",