mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-06 13:27:43 +08:00
fix: 修改安全入口长度校验 (#4594)
This commit is contained in:
parent
25608e7378
commit
e79a5f9ae2
4 changed files with 4 additions and 4 deletions
|
@ -1350,7 +1350,7 @@ const message = {
|
|||
showEntrance: 'Enable Home Page Notification Not Enabled',
|
||||
entranceHelper: 'Enabling secure entry will only allow logging in to the panel through specified secure entry.',
|
||||
entranceError:
|
||||
'Please enter a secure login entry point of 6-10 characters, only numbers or letters are supported.',
|
||||
'Please enter a secure login entry point of 5-116 characters, only numbers or letters are supported.',
|
||||
entranceInputHelper: 'When the security entry is set to blank, the security entry is cancelled.',
|
||||
randomGenerate: 'Random',
|
||||
expirationTime: 'Expiration Time',
|
||||
|
|
|
@ -1311,7 +1311,7 @@ const message = {
|
|||
entrance: '安全入口',
|
||||
showEntrance: '啟用概覽頁未開啟提醒',
|
||||
entranceHelper: '開啟安全入口後只能通過指定安全入口登錄面板',
|
||||
entranceError: '請輸入 6-10 位安全登錄入口,僅支持輸入數字或字母',
|
||||
entranceError: '請輸入 5-116 位安全登錄入口,僅支持輸入數字或字母',
|
||||
entranceInputHelper: '安全入口設置為空時,則取消安全入口',
|
||||
randomGenerate: '隨機生成',
|
||||
expirationTime: '密碼過期時間',
|
||||
|
|
|
@ -1312,7 +1312,7 @@ const message = {
|
|||
entrance: '安全入口',
|
||||
showEntrance: '启用概览页未开启提醒',
|
||||
entranceHelper: '开启安全入口后只能通过指定安全入口登录面板',
|
||||
entranceError: '请输入 6-10 位安全登录入口,仅支持输入数字或字母',
|
||||
entranceError: '请输入 5-116 位安全登录入口,仅支持输入数字或字母',
|
||||
entranceInputHelper: '安全入口设置为空时,则取消安全入口',
|
||||
randomGenerate: '随机生成',
|
||||
expirationTime: '密码过期时间',
|
||||
|
|
|
@ -72,7 +72,7 @@ const rules = reactive({
|
|||
|
||||
function checkSecurityEntrance(rule: any, value: any, callback: any) {
|
||||
if (form.securityEntrance !== '') {
|
||||
const reg = /^[A-Za-z0-9]{6,10}$/;
|
||||
const reg = /^[A-Za-z0-9]{5,116}$/;
|
||||
if (!reg.test(form.securityEntrance)) {
|
||||
return callback(new Error(i18n.global.t('setting.entranceError')));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue