From b7675248c36e0312d0cbe1850dfbe8aaa15d10d2 Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Mon, 18 Dec 2023 01:45:53 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=95=B4=E7=9A=84=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E5=AF=B9=E5=8E=9F=E5=A7=8B=E8=AF=B7=E6=B1=82=E7=9A=84?= =?UTF-8?q?token=E6=95=B0=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/Web/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/Web/index.js b/frontend/Web/index.js index 23ed90c..1e5dbe8 100644 --- a/frontend/Web/index.js +++ b/frontend/Web/index.js @@ -162,6 +162,12 @@ io.on('connection', async (socket) => { socket.emit('response', ret); } else{ + if(substrings.length!=4) + { + console.log("input has "+substrings.length+" words"); + socket.emit('response', "Invalid Input"); + return; + } if(head[1]=='R') { if(msg.split('\n').length!=2)