From: Jérôme Benoit Date: Sun, 30 Jul 2023 21:45:23 +0000 (+0200) Subject: fix: ensure transaction id is a safe integer X-Git-Tag: v1.2.20~71 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d1504492ed96495ddbba08549fccc5201774bce4;p=e-mobility-charging-stations-simulator.git fix: ensure transaction id is a safe integer Signed-off-by: Jérôme Benoit --- 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