From f91a1df749958aced4980c1d157552de1e85dc79 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Fri, 16 Dec 2022 00:37:33 +0800 Subject: [PATCH] update: secure path regex --- app/Http/Requests/Admin/ConfigSave.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/Admin/ConfigSave.php b/app/Http/Requests/Admin/ConfigSave.php index 12982374..2204c98b 100755 --- a/app/Http/Requests/Admin/ConfigSave.php +++ b/app/Http/Requests/Admin/ConfigSave.php @@ -46,7 +46,7 @@ class ConfigSave extends FormRequest 'register_limit_by_ip_enable' => 'in:0,1', 'register_limit_count' => 'integer', 'register_limit_expire' => 'integer', - 'secure_path' => 'min:8', + 'secure_path' => 'min:8|regex:/^[\w-]*$/', // subscribe 'plan_change_enable' => 'in:0,1', 'reset_traffic_method' => 'in:0,1,2,3,4', @@ -107,7 +107,8 @@ class ConfigSave extends FormRequest 'tos_url.url' => '服务条款URL格式不正确,必须携带http(s)://', 'telegram_discuss_link.url' => 'Telegram群组地址必须为URL格式,必须携带http(s)://', 'logo.url' => 'LOGO URL格式不正确,必须携带https(s)://', - 'secure_path.min' => '后台路径长度最小为8位' + 'secure_path.min' => '后台路径长度最小为8位', + 'secure_path.regex' => '后台路径只能为字母或数字' ]; } }