From 892f46f64ce347dc7052092e71f9dc3dbdb294f9 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Tue, 22 Apr 2025 13:57:12 +0100 Subject: [PATCH] fix: reject future machines as well --- lib/middlewares/rejectIncompatbleMachines.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/middlewares/rejectIncompatbleMachines.js b/lib/middlewares/rejectIncompatbleMachines.js index f105ea84..48ecef6f 100644 --- a/lib/middlewares/rejectIncompatbleMachines.js +++ b/lib/middlewares/rejectIncompatbleMachines.js @@ -18,6 +18,13 @@ const rejectIncompatibleMachines = function (req, res, next) { }) } + if (serverMajor < machineMajor) { + logger.error(`Machine version too new: ${machineVersion} deviceId: ${deviceId}`) + return res.status(400).json({ + error: 'Machine version too new' + }) + } + next() }