From 40085a4679d88d2c0a141b95ee6818ac7420dae3 Mon Sep 17 00:00:00 2001 From: Li Zhineng Date: Wed, 2 Jul 2025 20:42:18 +0800 Subject: improve mac and key checking --- server.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.mjs b/server.mjs index 18c6ee6..2475442 100644 --- a/server.mjs +++ b/server.mjs @@ -46,7 +46,8 @@ const eagleGenIdController = (req, res) => { const params = new URLSearchParams(query) const { mac, key } = JSON.parse(params.get('params') || '{}') - if (mac === undefined || key === undefined) { + if (mac === undefined || mac === null + || key === undefined || key === null) { res.writeHead(400, { 'Content-Type': 'application/json' }) res.end('{}\n') return -- cgit v1.2.3