From b3d936a44045a0026b73e09f42100dad6c5982e6 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 24 Nov 2022 18:18:49 +0800 Subject: [PATCH] * Fix bug #29833. --- frontend/module/instance/control.php | 2 +- frontend/module/instance/lang/zh-cn.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/module/instance/control.php b/frontend/module/instance/control.php index 95471eda..bc9be7fe 100644 --- a/frontend/module/instance/control.php +++ b/frontend/module/instance/control.php @@ -288,7 +288,7 @@ public function install($appID) if(isset($this->config->instance->keepDomainList[$customData->customDomain]) || $this->instance->domainExists($customData->customDomain)) return $this->send(array('result' => 'fail', 'message' => $customData->customDomain . $this->lang->instance->errors->domainExists)); if(!validater::checkLength($customData->customDomain, 20, 2)) return $this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->domainLength)); - if(!validater::checkREG($customData->customDomain, '/^[\w\d]+$/')) return $this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->wrongDomainCharacter)); + if(!validater::checkREG($customData->customDomain, '/^[[a-z]+\d]+$/')) return $this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->wrongDomainCharacter)); /* If select the version, replace the latest version of App by selected version. */ if($customData->version) diff --git a/frontend/module/instance/lang/zh-cn.php b/frontend/module/instance/lang/zh-cn.php index 1c651f8b..8bad069a 100644 --- a/frontend/module/instance/lang/zh-cn.php +++ b/frontend/module/instance/lang/zh-cn.php @@ -273,7 +273,7 @@ $lang->instance->errors = new stdclass; $lang->instance->errors->domainLength = '域名长度必须介于2-20字符之间'; $lang->instance->errors->domainExists = '域名已被占用,请使用其它域名。'; -$lang->instance->errors->wrongDomainCharacter = '域名只能是英文字母和数字'; +$lang->instance->errors->wrongDomainCharacter = '域名只能是小写英文字母和数字'; $lang->instance->errors->noAppInfo = '获取应用数据失败,请稍候重试。'; $lang->instance->errors->notEnoughResource = '集群资源不足'; $lang->instance->errors->notEnoughMemory = '%s 应用需要 %s 内存,当前可用内存%s ,还需要 %s,请扩充内存资源或卸载其他服务后重试!';