From 7c68b4a6bc78b9617a2ef584e15560a2f35b541b Mon Sep 17 00:00:00 2001 From: hujiabin Date: Fri, 14 Oct 2022 19:27:23 +0800 Subject: [PATCH] 1 --- webapp/controller/BagController.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index f6533871..91faca50 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -180,6 +180,12 @@ class BagController extends BaseAuthedController { $errMsg = 'Parameter error name length must not be greater than 16'; return; } + if(!preg_match("/^[a-z\d]*$/i",$name)) + { + $errCode = 5; + $errMsg = 'Excuse me , the name you entered is in the wrong format.'; + return; + } $nameService = new services\NameService(); if (!$nameService->verifyNameSign($name, $nameSign)){ $errCode = 5;