From d1504492ed96495ddbba08549fccc5201774bce4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 30 Jul 2023 23:45:23 +0200 Subject: [PATCH] fix: ensure transaction id is a safe integer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/1.6/OCPP16ResponseService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index 3ec3c159..12b10087 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -613,7 +613,7 @@ export class OCPP16ResponseService extends OCPPResponseService { ); return; } - if (!Number.isInteger(payload.transactionId)) { + if (!Number.isSafeInteger(payload.transactionId)) { logger.warn( `${chargingStation.logPrefix()} Trying to start a transaction on connector id ${transactionConnectorId.toString()} with a non integer transaction id ${ payload.transactionId -- 2.34.1