From a5f1cedf07bb3489f7e3b5254496afbf600d4e65 Mon Sep 17 00:00:00 2001 From: F4nniu Date: Mon, 5 Dec 2022 22:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=AD=E8=A8=80=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Lang.php b/library/think/Lang.php index a7ac042c..23887a2c 100644 --- a/library/think/Lang.php +++ b/library/think/Lang.php @@ -211,7 +211,7 @@ class Lang } } - if (preg_match('/^([a-z\d\-]+)/i', $langSet, $matches)) { + if (preg_match('/^([a-z0-9\-_]{2,10})$/i', $langSet, $matches)) { $langSet = strtolower($matches[1]); } else { $langSet = self::$range;