From 455376463d45983e0694f43ca316fc755f30b378 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Fri, 26 Jan 2024 17:31:08 +0800 Subject: [PATCH] update --- xumu.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xumu.py b/xumu.py index 73fcf67..254575b 100644 --- a/xumu.py +++ b/xumu.py @@ -263,12 +263,10 @@ async def process_data(request: Request): event = data["event"] clientid = data["clientid"] pattern = r'^farm_[a-zA-Z0-9]{12}$' - amatch = re.match(pattern, clientid) - if not amatch: - return BaseResponse(code=500, msg="不符合畜牧clientId") + amatch1 = re.match(pattern, clientid) pattern = r'^test' - amatch = re.match(pattern, clientid) - if not amatch: + amatch2 = re.match(pattern, clientid) + if not amatch1 and not amatch2: return BaseResponse(code=500, msg="不符合畜牧clientId") # 连接成功处理 if event == "client.connected":