fix: ensure transaction id is a safe integer
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 30 Jul 2023 21:45:23 +0000 (23:45 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 30 Jul 2023 21:45:23 +0000 (23:45 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts

index 3ec3c159bc88d219fabcc6d39ecaccd504d2f880..12b10087a5f4fecfbe322e8693bbd160f4efc95b 100644 (file)
@@ -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