From 74175cbdd7481bfa4a1d6684e7e0eb2247022fcb Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Fri, 26 Apr 2019 14:04:50 +0800 Subject: [PATCH] tenant code check update --- .../src/main/java/cn/escheduler/api/service/TenantService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/TenantService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/TenantService.java index 91b7f7b133..9fa8466175 100644 --- a/escheduler-api/src/main/java/cn/escheduler/api/service/TenantService.java +++ b/escheduler-api/src/main/java/cn/escheduler/api/service/TenantService.java @@ -80,7 +80,7 @@ public class TenantService extends BaseService{ Tenant tenant = new Tenant(); Date now = new Date(); - if (!tenantCode.matches("^[0-9a-zA-Z_.]{1,}$") || tenantCode.startsWith("-")){ + if (!tenantCode.matches("^[0-9a-zA-Z_.-]{1,}$") || tenantCode.startsWith("-") || tenantCode.startsWith(".")){ putMsg(result, Status.VERIFY_TENANT_CODE_ERROR); return result; }